Skip to content

Commit b45fc9f

Browse files
nx-cloud[bot]leosvelperez
authored andcommitted
cleanup(testing): use generic scoped package in check-imports test
1 parent c56607d commit b45fc9f

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

packages/jest/src/plugins/plugin.spec.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,14 +1128,13 @@ describe('@nx/jest/plugin config file inputs', () => {
11281128

11291129
it('should resolve moduleNameMapper <rootDir> to correct scoped package name', async () => {
11301130
await tempFs.createFiles({
1131-
'node_modules/@schematics/angular/package.json':
1132-
'{ "name": "@schematics/angular", "version": "1.0.0" }',
1133-
'node_modules/@schematics/angular/collection.json': '{}',
1131+
'node_modules/@acme/utils/package.json':
1132+
'{ "name": "@acme/utils", "version": "1.0.0" }',
1133+
'node_modules/@acme/utils/index.js': '{}',
11341134
});
11351135
mockConfig({
11361136
moduleNameMapper: {
1137-
'^@schematics/angular$':
1138-
'<rootDir>/../node_modules/@schematics/angular/collection.json',
1137+
'^@acme/utils$': '<rootDir>/../node_modules/@acme/utils/index.js',
11391138
},
11401139
});
11411140
const results = await createNodesFunction(
@@ -1145,7 +1144,7 @@ describe('@nx/jest/plugin config file inputs', () => {
11451144
);
11461145
expect(getTestInputs(results)).toContainEqual(
11471146
expect.objectContaining({
1148-
externalDependencies: expect.arrayContaining(['@schematics/angular']),
1147+
externalDependencies: expect.arrayContaining(['@acme/utils']),
11491148
})
11501149
);
11511150
});

0 commit comments

Comments
 (0)