Skip to content

Commit

Permalink
build(deps-dev): Bump prettier from 1.18.2 to 1.19.1 (#1835)
Browse files Browse the repository at this point in the history
* 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](prettier/prettier@1.18.2...1.19.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* refactor: fix linting
  • Loading branch information
dependabot-preview[bot] authored and simondel committed Nov 12, 2019
1 parent 4cd8dc8 commit 03fccb0
Show file tree
Hide file tree
Showing 18 changed files with 86 additions and 19 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -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",
Expand Down
5 changes: 4 additions & 1 deletion packages/core/src/ScoreResultCalculator.ts
Expand Up @@ -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 {
Expand Down
5 changes: 4 additions & 1 deletion packages/core/src/initializer/StrykerInitializer.ts
Expand Up @@ -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<PromptOption | null> {
Expand Down
16 changes: 14 additions & 2 deletions packages/core/src/input/InputFileCollection.ts
Expand Up @@ -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
)}`
);
}
}
}
Expand Down
8 changes: 7 additions & 1 deletion packages/core/src/process/InitialTestExecutor.ts
Expand Up @@ -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
)}`
);
}
}

Expand Down
5 changes: 4 additions & 1 deletion packages/core/test/unit/TestableMutant.spec.ts
Expand Up @@ -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);
});

Expand Down
Expand Up @@ -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] }
);
Expand Down
5 changes: 4 additions & 1 deletion packages/core/test/unit/mutants/MutantTestMatcher.spec.ts
Expand Up @@ -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);

Expand Down
6 changes: 5 additions & 1 deletion packages/core/test/unit/process/InitialTestExecutor.spec.ts
Expand Up @@ -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);
});

Expand Down
Expand Up @@ -44,7 +44,10 @@ describe('EventRecorderReporter', () => {
beforeEach(() => {
writeFileRejection = undefined;
(sut[eventName] as any)(expected);
return (sut.wrapUp() as Promise<void>).then(() => void 0, error => (writeFileRejection = error));
return (sut.wrapUp() as Promise<void>).then(
() => void 0,
error => (writeFileRejection = error)
);
});

describe('when writeFile results in a rejection', () => {
Expand Down
4 changes: 3 additions & 1 deletion packages/core/test/unit/test-runner/TimeoutDecorator.spec.ts
Expand Up @@ -71,7 +71,9 @@ describe('TimeoutDecorator', () => {
});

it('should handle timeouts', () => {
testRunner1.run.returns(new Promise<string>(() => {}));
testRunner1.run.returns(
new Promise<string>(() => {})
);
const runPromise = sut.run({ timeout: 20 });
clock.tick(20);
return expect(
Expand Down
Expand Up @@ -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);
});

Expand Down
Expand Up @@ -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(() => {
Expand Down
Expand Up @@ -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;'));
});
Expand Down
Expand Up @@ -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)')
Expand Down
Expand Up @@ -39,6 +39,9 @@ export default class ConditionalExpressionMutator extends NodeMutator<ts.BinaryE
return [];
}

return [{ node, replacement: 'false' }, { node, replacement: 'true' }];
return [
{ node, replacement: 'false' },
{ node, replacement: 'true' }
];
}
}
5 changes: 4 additions & 1 deletion packages/typescript/src/mutator/IfStatementMutator.ts
Expand Up @@ -9,6 +9,9 @@ export default class IfStatementMutator extends NodeMutator<ts.IfStatement> {
}

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' }
];
}
}
5 changes: 4 additions & 1 deletion packages/typescript/test/unit/TypescriptMutator.spec.ts
Expand Up @@ -13,7 +13,10 @@ class FunctionDeclarationMutator extends NodeMutator<ts.FunctionDeclaration> {
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()' }
];
}
}

Expand Down

0 comments on commit 03fccb0

Please sign in to comment.