Skip to content

Commit

Permalink
fix(core): don't generate test related things in README when no unitT…
Browse files Browse the repository at this point in the history
…estRunner
  • Loading branch information
juristr authored and vsavkin committed Feb 26, 2020
1 parent ef8ddb5 commit 2c7d6a1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions packages/workspace/src/schematics/library/files/lib/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# <%= name %>

This library was generated with [Nx](https://nx.dev).
<% if(hasUnitTestRunner) { %>

## Running unit tests

Run `ng test <%= name %>` to execute the unit tests via [Jest](https://jestjs.io).

<% } %>
3 changes: 2 additions & 1 deletion packages/workspace/src/schematics/library/library.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ function createFiles(options: NormalizedSchema): Rule {
...options,
...names(options.name),
tmpl: '',
offsetFromRoot: offsetFromRoot(options.projectRoot)
offsetFromRoot: offsetFromRoot(options.projectRoot),
hasUnitTestRunner: options.unitTestRunner !== 'none'
}),
move(options.projectRoot)
])
Expand Down

0 comments on commit 2c7d6a1

Please sign in to comment.