Skip to content

Commit

Permalink
Switch between npm & yarn for tests (#246)
Browse files Browse the repository at this point in the history
- Removing final usage of npm whilst in yarn mode
  • Loading branch information
ErisDS authored and sindresorhus committed Feb 21, 2018
1 parent 18a850f commit d0499c6
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions index.js
Expand Up @@ -83,10 +83,18 @@ module.exports = (input, opts) => {
}

if (runTests) {
tasks.add({
title: 'Running tests',
task: () => exec('npm', ['test'])
});
tasks.add([
{
title: 'Running tests using npm',
enabled: () => opts.yarn === false,
task: () => exec('npm', ['test'])
},
{
title: 'Running tests using Yarn',
enabled: () => opts.yarn === true,
task: () => exec('yarn', ['test'])
}
]);
}

tasks.add([
Expand Down

0 comments on commit d0499c6

Please sign in to comment.