Skip to content

Commit 4327ca9

Browse files
juristrvsavkin
authored andcommitted
fix(core): don't generate test related things in README when no unitTestRunner
1 parent 7cb949d commit 4327ca9

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# <%= name %>
22

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

56
## Running unit tests
67

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

packages/workspace/src/schematics/library/library.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ function createFiles(options: NormalizedSchema): Rule {
7474
...options,
7575
...names(options.name),
7676
tmpl: '',
77-
offsetFromRoot: offsetFromRoot(options.projectRoot)
77+
offsetFromRoot: offsetFromRoot(options.projectRoot),
78+
hasUnitTestRunner: options.unitTestRunner !== 'none'
7879
}),
7980
move(options.projectRoot)
8081
])

0 commit comments

Comments
 (0)