Skip to content

Commit 5823a18

Browse files
committed
fix(cli): add --allow-console-logs to app npm test script
The generated app using our CLI has console.log.
1 parent 4104e13 commit 5823a18

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

packages/cli/generators/project/templates/package.json.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<% } -%>
3636
"pretest": "npm run clean && npm run build",
3737
<% if (project.mocha) { -%>
38-
"test": "lb-mocha \"DIST/test\"",
38+
"test": "lb-mocha --allow-console-logs \"DIST/test\"",
3939
<% } -%>
4040
<% if (project.prettier || project.tslint) { -%>
4141
"posttest": "npm run lint",

packages/cli/test/app-run.test.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,10 @@ describe('app-generator', function() {
4343
it('passes `npm test` for the generated project', () => {
4444
process.chdir(sandbox);
4545
return new Promise((resolve, reject) => {
46-
build
47-
.runShell('npm', ['test', '--', '--allow-console-logs'])
48-
.on('close', code => {
49-
assert.equal(code, 0);
50-
resolve();
51-
});
46+
build.runShell('npm', ['test']).on('close', code => {
47+
assert.equal(code, 0);
48+
resolve();
49+
});
5250
});
5351
});
5452

0 commit comments

Comments
 (0)