From d101f587897f0b5ee98bdfcc68271364e74cdf5e Mon Sep 17 00:00:00 2001 From: Simon Mezzomo Date: Thu, 1 Oct 2020 01:32:24 +0200 Subject: [PATCH] feat(cli): add exit option to mocharc template in generator Signed-off-by: Simon Mezzomo --- .../cli/generators/project/templates/.mocharc.json | 1 + .../generators/app.integration.snapshots.js | 10 ++++++++++ .../cli/test/integration/generators/app.integration.js | 4 ++++ 3 files changed, 15 insertions(+) diff --git a/packages/cli/generators/project/templates/.mocharc.json b/packages/cli/generators/project/templates/.mocharc.json index c00241bf8d84..7b523c31636f 100644 --- a/packages/cli/generators/project/templates/.mocharc.json +++ b/packages/cli/generators/project/templates/.mocharc.json @@ -1,4 +1,5 @@ { + "exit": true, "recursive": true, "require": "source-map-support/register" } diff --git a/packages/cli/snapshots/integration/generators/app.integration.snapshots.js b/packages/cli/snapshots/integration/generators/app.integration.snapshots.js index f173fe3d782c..62fd3d6fe92d 100644 --- a/packages/cli/snapshots/integration/generators/app.integration.snapshots.js +++ b/packages/cli/snapshots/integration/generators/app.integration.snapshots.js @@ -7,6 +7,16 @@ 'use strict'; +exports[`app-generator specific files creates .mocharc.json 1`] = ` +{ + "exit": true, + "recursive": true, + "require": "source-map-support/register" +} + +`; + + exports[`app-generator specific files generates all the proper files 1`] = ` # my-app diff --git a/packages/cli/test/integration/generators/app.integration.js b/packages/cli/test/integration/generators/app.integration.js index 2278889396a8..518f4bf0a6b9 100644 --- a/packages/cli/test/integration/generators/app.integration.js +++ b/packages/cli/test/integration/generators/app.integration.js @@ -93,6 +93,10 @@ describe('app-generator specific files', () => { it('creates .gitignore', () => { assert.fileContent('.gitignore', /^\*\.tsbuildinfo$/m); }); + + it('creates .mocharc.json', () => { + assertFilesToMatchSnapshot({}, '.mocharc.json'); + }); }); describe('app-generator with docker disabled', () => {