From 03fccb0ce49817a83cab4c6378c1d7dbf047d0df Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 12 Nov 2019 21:14:28 +0100 Subject: [PATCH] build(deps-dev): Bump prettier from 1.18.2 to 1.19.1 (#1835) * build(deps-dev): Bump prettier from 1.18.2 to 1.19.1 Bumps [prettier](https://github.com/prettier/prettier) from 1.18.2 to 1.19.1. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/master/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/1.18.2...1.19.1) Signed-off-by: dependabot-preview[bot] * refactor: fix linting --- package.json | 2 +- packages/core/src/ScoreResultCalculator.ts | 5 ++++- .../core/src/initializer/StrykerInitializer.ts | 5 ++++- packages/core/src/input/InputFileCollection.ts | 16 ++++++++++++++-- packages/core/src/process/InitialTestExecutor.ts | 8 +++++++- packages/core/test/unit/TestableMutant.spec.ts | 5 ++++- .../unit/initializer/StrykerInitializer.spec.ts | 4 +++- .../test/unit/mutants/MutantTestMatcher.spec.ts | 5 ++++- .../unit/process/InitialTestExecutor.spec.ts | 6 +++++- .../unit/reporters/EventRecorderReporter.spec.ts | 5 ++++- .../unit/test-runner/TimeoutDecorator.spec.ts | 4 +++- .../transpiler/MutantTranspileScheduler.spec.ts | 5 ++++- .../test/integration/nestedSuite.it.spec.ts | 6 +++++- .../test/unit/JasmineTestFramework.spec.ts | 7 ++++++- .../test/unit/MochaTestFramework.spec.ts | 7 ++++++- .../src/mutator/ConditionalExpressionMutator.ts | 5 ++++- .../typescript/src/mutator/IfStatementMutator.ts | 5 ++++- .../test/unit/TypescriptMutator.spec.ts | 5 ++++- 18 files changed, 86 insertions(+), 19 deletions(-) diff --git a/package.json b/package.json index 2b373fbd70..5afbf1ccb2 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "link-parent-bin": "~1.0.0", "mocha": "^6.1.2", "nyc": "^14.0.0", - "prettier": "~1.18.2", + "prettier": "~1.19.1", "rimraf": "^3.0.0", "rxjs": "^6.4.0", "sinon": "^7.2.0", diff --git a/packages/core/src/ScoreResultCalculator.ts b/packages/core/src/ScoreResultCalculator.ts index 94faf2de27..055ccf07ca 100644 --- a/packages/core/src/ScoreResultCalculator.ts +++ b/packages/core/src/ScoreResultCalculator.ts @@ -90,7 +90,10 @@ export default class ScoreResultCalculator { return Object.keys(filesGroupedByDirectory) .map(directory => - this.calculateScoreResult(flatMap(filesGroupedByDirectory[directory], file => resultsGroupedByFiles[file]), childrenBasePath) + this.calculateScoreResult( + flatMap(filesGroupedByDirectory[directory], file => resultsGroupedByFiles[file]), + childrenBasePath + ) ) .sort(this.compareScoreResults); } else { diff --git a/packages/core/src/initializer/StrykerInitializer.ts b/packages/core/src/initializer/StrykerInitializer.ts index 662320e32f..e69d99c593 100644 --- a/packages/core/src/initializer/StrykerInitializer.ts +++ b/packages/core/src/initializer/StrykerInitializer.ts @@ -104,7 +104,10 @@ export default class StrykerInitializer { selectedPackageManager, await this.fetchAdditionalConfig(npmDependencies) ); - this.installNpmDependencies(npmDependencies.map(pkg => pkg.name), selectedPackageManager); + this.installNpmDependencies( + npmDependencies.map(pkg => pkg.name), + selectedPackageManager + ); } private async selectTestRunner(): Promise { diff --git a/packages/core/src/input/InputFileCollection.ts b/packages/core/src/input/InputFileCollection.ts index 3d9d829c15..c5dcd36f4e 100644 --- a/packages/core/src/input/InputFileCollection.ts +++ b/packages/core/src/input/InputFileCollection.ts @@ -29,8 +29,20 @@ export default class InputFileCollection { ); } if (log.isDebugEnabled()) { - log.debug(`All input files: ${JSON.stringify(this.files.map(file => file.name), null, 2)}`); - log.debug(`Files to mutate: ${JSON.stringify(this.filesToMutate.map(file => file.name), null, 2)}`); + log.debug( + `All input files: ${JSON.stringify( + this.files.map(file => file.name), + null, + 2 + )}` + ); + log.debug( + `Files to mutate: ${JSON.stringify( + this.filesToMutate.map(file => file.name), + null, + 2 + )}` + ); } } } diff --git a/packages/core/src/process/InitialTestExecutor.ts b/packages/core/src/process/InitialTestExecutor.ts index 6fd060ce72..fa9e8eed79 100644 --- a/packages/core/src/process/InitialTestExecutor.ts +++ b/packages/core/src/process/InitialTestExecutor.ts @@ -170,7 +170,13 @@ export default class InitialTestExecutor { private logTranspileResult(transpiledFiles: readonly File[]) { if (this.options.transpilers.length && this.log.isDebugEnabled()) { - this.log.debug(`Transpiled files: ${JSON.stringify(transpiledFiles.map(f => `${f.name}`), null, 2)}`); + this.log.debug( + `Transpiled files: ${JSON.stringify( + transpiledFiles.map(f => `${f.name}`), + null, + 2 + )}` + ); } } diff --git a/packages/core/test/unit/TestableMutant.spec.ts b/packages/core/test/unit/TestableMutant.spec.ts index 839bef8154..6941590741 100644 --- a/packages/core/test/unit/TestableMutant.spec.ts +++ b/packages/core/test/unit/TestableMutant.spec.ts @@ -38,7 +38,10 @@ describe(TestableMutant.name, () => { sut.selectTest(testResult({ name: 'spec1', timeSpentMs: 12 }), 0); sut.selectTest(testResult({ name: 'spec3', timeSpentMs: 32 }), 2); expect(sut.timeSpentScopedTests).eq(44); - expect(sut.selectedTests).deep.eq([{ id: 0, name: 'spec1' }, { id: 2, name: 'spec3' }]); + expect(sut.selectedTests).deep.eq([ + { id: 0, name: 'spec1' }, + { id: 2, name: 'spec3' } + ]); expect(sut.testSelectionResult).eq(TestSelectionResult.Success); }); diff --git a/packages/core/test/unit/initializer/StrykerInitializer.spec.ts b/packages/core/test/unit/initializer/StrykerInitializer.spec.ts index ece60b2e15..10ff046adc 100644 --- a/packages/core/test/unit/initializer/StrykerInitializer.spec.ts +++ b/packages/core/test/unit/initializer/StrykerInitializer.spec.ts @@ -242,7 +242,9 @@ describe(StrykerInitializer.name, () => { }); await sut.initialize(); expect(out).calledWith('Installing NPM dependencies...'); - expect(childExecSync).calledWith( + expect( + childExecSync + ).calledWith( 'npm i --save-dev @stryker-mutator/awesome-runner @stryker-mutator/awesome-framework @stryker-mutator/typescript @stryker-mutator/webpack stryker-dimension-reporter @stryker-mutator/mars-reporter', { stdio: [0, 1, 2] } ); diff --git a/packages/core/test/unit/mutants/MutantTestMatcher.spec.ts b/packages/core/test/unit/mutants/MutantTestMatcher.spec.ts index 3e8e06ddc9..bd1e59b4a5 100644 --- a/packages/core/test/unit/mutants/MutantTestMatcher.spec.ts +++ b/packages/core/test/unit/mutants/MutantTestMatcher.spec.ts @@ -233,7 +233,10 @@ describe(MutantTestMatcher.name, () => { }); it('should have added the run results to the mutants', async () => { - const expectedTestSelectionFirstMutant: TestSelection[] = [{ id: 0, name: 'test one' }, { id: 1, name: 'test two' }]; + const expectedTestSelectionFirstMutant: TestSelection[] = [ + { id: 0, name: 'test one' }, + { id: 1, name: 'test two' } + ]; const result = await sut.matchWithMutants(mutants); diff --git a/packages/core/test/unit/process/InitialTestExecutor.spec.ts b/packages/core/test/unit/process/InitialTestExecutor.spec.ts index 1060459fa1..d83fbd9e93 100644 --- a/packages/core/test/unit/process/InitialTestExecutor.spec.ts +++ b/packages/core/test/unit/process/InitialTestExecutor.spec.ts @@ -140,7 +140,11 @@ describe('InitialTestExecutor run', () => { sut = createSut(); await sut.run(); const actualLogMessage: string = testInjector.logger.debug.getCall(0).args[0]; - const expectedLogMessage = `Transpiled files: ${JSON.stringify(coverageAnnotatedFiles.map(_ => _.name), null, 2)}`; + const expectedLogMessage = `Transpiled files: ${JSON.stringify( + coverageAnnotatedFiles.map(_ => _.name), + null, + 2 + )}`; expect(actualLogMessage).eq(expectedLogMessage); }); diff --git a/packages/core/test/unit/reporters/EventRecorderReporter.spec.ts b/packages/core/test/unit/reporters/EventRecorderReporter.spec.ts index b260f850a0..21e9e9dfd2 100644 --- a/packages/core/test/unit/reporters/EventRecorderReporter.spec.ts +++ b/packages/core/test/unit/reporters/EventRecorderReporter.spec.ts @@ -44,7 +44,10 @@ describe('EventRecorderReporter', () => { beforeEach(() => { writeFileRejection = undefined; (sut[eventName] as any)(expected); - return (sut.wrapUp() as Promise).then(() => void 0, error => (writeFileRejection = error)); + return (sut.wrapUp() as Promise).then( + () => void 0, + error => (writeFileRejection = error) + ); }); describe('when writeFile results in a rejection', () => { diff --git a/packages/core/test/unit/test-runner/TimeoutDecorator.spec.ts b/packages/core/test/unit/test-runner/TimeoutDecorator.spec.ts index 88e5735b52..49ab4825df 100644 --- a/packages/core/test/unit/test-runner/TimeoutDecorator.spec.ts +++ b/packages/core/test/unit/test-runner/TimeoutDecorator.spec.ts @@ -71,7 +71,9 @@ describe('TimeoutDecorator', () => { }); it('should handle timeouts', () => { - testRunner1.run.returns(new Promise(() => {})); + testRunner1.run.returns( + new Promise(() => {}) + ); const runPromise = sut.run({ timeout: 20 }); clock.tick(20); return expect( diff --git a/packages/core/test/unit/transpiler/MutantTranspileScheduler.spec.ts b/packages/core/test/unit/transpiler/MutantTranspileScheduler.spec.ts index d43b0f7c9c..811b619531 100644 --- a/packages/core/test/unit/transpiler/MutantTranspileScheduler.spec.ts +++ b/packages/core/test/unit/transpiler/MutantTranspileScheduler.spec.ts @@ -122,7 +122,10 @@ describe(MutantTranspileScheduler.name, () => { resolveSecond(transpiledFilesTwo); // Assert: all results are in await sleep(); - const expectedResults: TranspileResult[] = [{ error: null, outputFiles: transpiledFilesOne }, { error: null, outputFiles: transpiledFilesTwo }]; + const expectedResults: TranspileResult[] = [ + { error: null, outputFiles: transpiledFilesOne }, + { error: null, outputFiles: transpiledFilesTwo } + ]; expect(actualResults).deep.eq(expectedResults); }); diff --git a/packages/jasmine-framework/test/integration/nestedSuite.it.spec.ts b/packages/jasmine-framework/test/integration/nestedSuite.it.spec.ts index 21a43d07b1..0630aadd49 100644 --- a/packages/jasmine-framework/test/integration/nestedSuite.it.spec.ts +++ b/packages/jasmine-framework/test/integration/nestedSuite.it.spec.ts @@ -24,7 +24,11 @@ describe('Selecting tests with nested suites', () => { beforeEach(() => { sut = new JasmineTestFramework(); - testSelections = [{ id: 0, name: 'outer test 1' }, { id: 1, name: 'outer inner test 2' }, { id: 2, name: 'outer test 3' }]; + testSelections = [ + { id: 0, name: 'outer test 1' }, + { id: 1, name: 'outer inner test 2' }, + { id: 2, name: 'outer test 3' } + ]; }); afterEach(() => { diff --git a/packages/jasmine-framework/test/unit/JasmineTestFramework.spec.ts b/packages/jasmine-framework/test/unit/JasmineTestFramework.spec.ts index 610265db4b..7f4085c774 100644 --- a/packages/jasmine-framework/test/unit/JasmineTestFramework.spec.ts +++ b/packages/jasmine-framework/test/unit/JasmineTestFramework.spec.ts @@ -21,7 +21,12 @@ describe('JasmineTestFramework', () => { describe('filter()', () => { it("should result in a specFilter of jasmine it's", () => - expect(sut.filter([{ id: 5, name: 'test five' }, { id: 8, name: 'test eight' }])) + expect( + sut.filter([ + { id: 5, name: 'test five' }, + { id: 8, name: 'test eight' } + ]) + ) .to.contain('jasmine.getEnv().specFilter = function (spec)') .and.to.contain('return ["test five","test eight"].indexOf(spec.getFullName()) !== -1;')); }); diff --git a/packages/mocha-framework/test/unit/MochaTestFramework.spec.ts b/packages/mocha-framework/test/unit/MochaTestFramework.spec.ts index cc93ba3ea0..a7ae7f7296 100644 --- a/packages/mocha-framework/test/unit/MochaTestFramework.spec.ts +++ b/packages/mocha-framework/test/unit/MochaTestFramework.spec.ts @@ -21,7 +21,12 @@ describe('MochaTestFramework', () => { describe('filter()', () => { it("should result in a filtering of mocha it's", () => { - expect(sut.filter([{ id: 5, name: 'test five' }, { id: 8, name: 'test eight' }])) + expect( + sut.filter([ + { id: 5, name: 'test five' }, + { id: 8, name: 'test eight' } + ]) + ) .to.contain('var realAddTest = Mocha.Suite.prototype.addTest;') .and.to.contain('selectedTestNames = ["test five","test eight"];') .and.to.contain('if(selectedTestNames.indexOf(name) !== -1)') diff --git a/packages/typescript/src/mutator/ConditionalExpressionMutator.ts b/packages/typescript/src/mutator/ConditionalExpressionMutator.ts index 67080c13eb..f5761016fe 100644 --- a/packages/typescript/src/mutator/ConditionalExpressionMutator.ts +++ b/packages/typescript/src/mutator/ConditionalExpressionMutator.ts @@ -39,6 +39,9 @@ export default class ConditionalExpressionMutator extends NodeMutator { } protected identifyReplacements(ifStatement: ts.IfStatement): NodeReplacement[] { - return [{ node: ifStatement.expression, replacement: 'true' }, { node: ifStatement.expression, replacement: 'false' }]; + return [ + { node: ifStatement.expression, replacement: 'true' }, + { node: ifStatement.expression, replacement: 'false' } + ]; } } diff --git a/packages/typescript/test/unit/TypescriptMutator.spec.ts b/packages/typescript/test/unit/TypescriptMutator.spec.ts index 4c217c2ec4..b69b01a6b9 100644 --- a/packages/typescript/test/unit/TypescriptMutator.spec.ts +++ b/packages/typescript/test/unit/TypescriptMutator.spec.ts @@ -13,7 +13,10 @@ class FunctionDeclarationMutator extends NodeMutator { return node.kind === ts.SyntaxKind.FunctionDeclaration; } protected identifyReplacements(node: ts.FunctionDeclaration): NodeReplacement[] { - return [{ node, replacement: '// Function declaration removed' }, { node, replacement: 'changedToOtherCall()' }]; + return [ + { node, replacement: '// Function declaration removed' }, + { node, replacement: 'changedToOtherCall()' } + ]; } }