-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core): add implicitDependencies: '*'
- Loading branch information
1 parent
c18ec6c
commit e49243d
Showing
3 changed files
with
68 additions
and
14 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
packages/nx/src/project-graph/build-nodes/workspace-projects.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { ProjectConfiguration } from 'nx/src/config/workspace-json-project-json'; | ||
import { normalizeImplicitDependencies } from './workspace-projects'; | ||
|
||
describe('workspace-projects', () => { | ||
describe('normalizeImplicitDependencies', () => { | ||
it('should expand "*" implicit dependencies', () => { | ||
expect( | ||
normalizeImplicitDependencies('test-project', ['*'], { | ||
fileMap: {}, | ||
filesToProcess: {}, | ||
workspace: { | ||
version: 2, | ||
projects: { | ||
...makeProject('test-project'), | ||
...makeProject('a'), | ||
...makeProject('b'), | ||
...makeProject('c'), | ||
}, | ||
}, | ||
}) | ||
).toEqual(['a', 'b', 'c']); | ||
}); | ||
}); | ||
}); | ||
|
||
function makeProject(name: string): Record<string, ProjectConfiguration> { | ||
return { | ||
[name]: { | ||
root: `packages/${name}`, | ||
}, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters