Skip to content

Commit

Permalink
fix(core): fix js test
Browse files Browse the repository at this point in the history
  • Loading branch information
meeroslav committed Apr 6, 2023
1 parent 45a06a4 commit 5184e36
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 23 deletions.
5 changes: 2 additions & 3 deletions docs/generated/packages/web/documents/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,8 @@ To create a generic TypeScript library (i.e. non-framework specific), use the [`
```shell
nx g @nrwl/js:lib my-new-lib

# If you want the library to be buildable or publishable to npm
nx g @nrwl/web:lib my-new-lib --buildable
nx g @nrwl/web:lib my-new-lib \
# If you want the library to be publishable to npm
nx g @nrwl/js:lib my-new-lib \
--publishable \
--importPath=@myorg/my-new-lib
```
Expand Down
5 changes: 2 additions & 3 deletions docs/shared/packages/web/web-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,8 @@ To create a generic TypeScript library (i.e. non-framework specific), use the [`
```shell
nx g @nrwl/js:lib my-new-lib

# If you want the library to be buildable or publishable to npm
nx g @nrwl/web:lib my-new-lib --buildable
nx g @nrwl/web:lib my-new-lib \
# If you want the library to be publishable to npm
nx g @nrwl/js:lib my-new-lib \
--publishable \
--importPath=@myorg/my-new-lib
```
Expand Down
10 changes: 1 addition & 9 deletions e2e/js/src/js.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,17 +151,9 @@ export function ${lib}Wildcard() {

it('should not be able to be built when it has no bundler', () => {
const nonBuildable = uniq('buildable');

runCLI(`generate @nrwl/js:lib ${nonBuildable} --bundler=none`);

const result = runCLI(`build ${nonBuildable}`);

expect(result).toContain(
`Compiling TypeScript files for project "${nonBuildable}"...`
);
expect(result).toContain(
`Done compiling TypeScript files for project "${nonBuildable}".`
);
expect(() => runCLI(`build ${nonBuildable}`)).toThrow();

checkFilesDoNotExist(`dist/libs/${nonBuildable}/README.md`);
});
Expand Down
4 changes: 2 additions & 2 deletions e2e/nx-run/src/run.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,8 @@ describe('Nx Running Tests', () => {
mylib1 = uniq('mylib1');
mylib2 = uniq('mylib1');
runCLI(`generate @nrwl/web:app ${myapp}`);
runCLI(`generate @nrwl/web:lib ${mylib1} --buildable`);
runCLI(`generate @nrwl/web:lib ${mylib2} --buildable`);
runCLI(`generate @nrwl/js:lib ${mylib1}`);
runCLI(`generate @nrwl/js:lib ${mylib2}`);

updateFile(
`apps/${myapp}/src/main.ts`,
Expand Down
6 changes: 0 additions & 6 deletions packages/web/src/generators/application/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,6 @@ function setDefaults(tree: Tree, options: NormalizedSchema) {
e2eTestRunner: options.e2eTestRunner,
...nxJson.generators['@nrwl/web:application'],
};
nxJson.generators['@nrwl/web:library'] = {
style: options.style,
linter: options.linter,
unitTestRunner: options.unitTestRunner,
...nxJson.generators['@nrwl/web:library'],
};
updateNxJson(tree, nxJson);
}

Expand Down

0 comments on commit 5184e36

Please sign in to comment.