Skip to content

Commit

Permalink
fix(presets): install v1.x dependencies instead of v0.x (#1434)
Browse files Browse the repository at this point in the history
  • Loading branch information
simondel authored and nicojs committed Mar 2, 2019
1 parent 948166b commit 7edda46
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/initializer/presets/AngularPreset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ export class AngularPreset implements Preset {
public readonly name = 'angular-cli';
// Please keep config in sync with handbook
private readonly dependencies = [
'stryker',
'@stryker-mutator/core',
'@stryker-mutator/karma-runner',
'@stryker-mutator/typescript',
'stryker-html-reporter'
'@stryker-mutator/html-reporter'
];
private readonly config = `{
mutate: [
Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/initializer/presets/ReactPreset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ const handbookUrl = 'https://github.com/stryker-mutator/stryker-handbook/blob/ma
export class ReactPreset implements Preset {
public readonly name = 'react';
private readonly generalDependencies = [
'stryker',
'stryker-jest-runner',
'stryker-html-reporter'
'@stryker-mutator/core',
'@stryker-mutator/jest-runner',
'@stryker-mutator/html-reporter'
];

private readonly sharedConfig = `testRunner: 'jest',
Expand Down
8 changes: 4 additions & 4 deletions packages/core/src/initializer/presets/VueJsPreset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ const handbookUrl = 'https://github.com/stryker-mutator/stryker-handbook/blob/ma
export class VueJsPreset implements Preset {
public readonly name = 'vueJs';
private readonly generalDependencies = [
'stryker',
'stryker-vue-mutator',
'stryker-html-reporter'
'@stryker-mutator/core',
'@stryker-mutator/vue-mutator',
'@stryker-mutator/html-reporter'
];

private readonly jestDependency = 'stryker-jest-runner';
private readonly jestDependency = '@stryker-mutator/jest-runner';
private readonly jestConf = `{
mutate: ['src/**/*.js', 'src/**/*.ts', 'src/**/*.vue'],
mutator: 'vue',
Expand Down
12 changes: 6 additions & 6 deletions packages/core/test/unit/initializer/Presets.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ describe('Presets', () => {
expect(config.config).to.contain(`mutator: 'typescript'`);
});

it('should install stryker-typescript when TSX is chosen', async () => {
it('should install @stryker-mutator/typescript when TSX is chosen', async () => {
inquirerPrompt.resolves({
choice: 'TSX'
});
Expand All @@ -68,7 +68,7 @@ describe('Presets', () => {
expect(config.config).to.include(`mutator: 'javascript'`);
});

it('should install stryker-javascript-mutator when JSX is chosen', async () => {
it('should install @stryker-mutator/javascript-mutator when JSX is chosen', async () => {
inquirerPrompt.resolves({
choice: 'JSX'
});
Expand Down Expand Up @@ -106,16 +106,16 @@ describe('Presets', () => {
expect(config.dependencies).to.include('@stryker-mutator/karma-runner');
});

it('should install stryker-jest-runner when jest is chosen', async () => {
it('should install @stryker-mutator/jest-runner when jest is chosen', async () => {
inquirerPrompt.resolves({
script: 'typescript',
testRunner: 'jest'
});
const config = await vueJsPreset.createConfig();
expect(config.dependencies).to.include('stryker-jest-runner');
expect(config.dependencies).to.include('@stryker-mutator/jest-runner');
});

it('should install stryker-typescript when typescript is chosen', async () => {
it('should install @stryker-mutator/typescript when typescript is chosen', async () => {
inquirerPrompt.resolves({
script: 'typescript',
testRunner: 'karma'
Expand All @@ -124,7 +124,7 @@ describe('Presets', () => {
expect(config.dependencies).to.include('@stryker-mutator/typescript');
});

it('should install stryker-javascript-mutator when javascript is chosen', async () => {
it('should install @stryker-mutator/javascript-mutator when javascript is chosen', async () => {
inquirerPrompt.resolves({
script: 'javascript',
testRunner: 'karma'
Expand Down

0 comments on commit 7edda46

Please sign in to comment.