Skip to content

Commit

Permalink
feat(babel-istanbul): also removed the babel-plugin when moving away …
Browse files Browse the repository at this point in the history
…from nyc
  • Loading branch information
travi committed Jun 3, 2022
1 parent 2d00350 commit d94a8a3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/coverage/nyc/remover-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ suite('nyc remover', () => {
assert.calledWith(fs.rmdir, `${projectRoot}/.nyc_output`, {recursive: true, force: true});
assert.calledWith(
dependencyRemover.default,
{packageManager, dependencies: ['nyc', '@istanbuljs/nyc-config-babel']}
{packageManager, dependencies: ['nyc', '@istanbuljs/nyc-config-babel', 'babel-plugin-istanbul']}
);
});
});
2 changes: 1 addition & 1 deletion src/coverage/nyc/remover.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ export default async function ({projectRoot, packageManager}) {
await Promise.all([
fs.unlink(`${projectRoot}/.nycrc`),
fs.rmdir(`${projectRoot}/.nyc_output`, {recursive: true, force: true}),
removeDependencies({packageManager, dependencies: ['nyc', '@istanbuljs/nyc-config-babel']})
removeDependencies({packageManager, dependencies: ['nyc', '@istanbuljs/nyc-config-babel', 'babel-plugin-istanbul']})
]);
}
6 changes: 5 additions & 1 deletion test/integration/features/step_definitions/coverage-steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ Given('existing c8 config is present', async function () {
Then('nyc is not configured for code coverage', async function () {
assert.isFalse(await fileExists(`${process.cwd()}/.nycrc`));
assert.isFalse(await directoryExists(`${process.cwd()}/.nyc_output`));
assertDependenciesWereRemoved(this.execa, this.packageManager, ['nyc', '@istanbuljs/nyc-config-babel']);
assertDependenciesWereRemoved(
this.execa,
this.packageManager,
['nyc', '@istanbuljs/nyc-config-babel', 'babel-plugin-istanbul']
);
});

Then('c8 is configured for code coverage', async function () {
Expand Down

0 comments on commit d94a8a3

Please sign in to comment.