diff options
Diffstat (limited to 'node_modules/ava-init/index.js')
-rw-r--r-- | node_modules/ava-init/index.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/node_modules/ava-init/index.js b/node_modules/ava-init/index.js index 9aef769c0..0cf16c472 100644 --- a/node_modules/ava-init/index.js +++ b/node_modules/ava-init/index.js @@ -22,8 +22,10 @@ module.exports = opts => { const cli = opts.args || process.argv.slice(2); const args = arrExclude(cli, ['--init', '--unicorn']); const cmd = 'ava' + (args.length > 0 ? ' ' + args.join(' ') : ''); - const s = pkg.scripts = pkg.scripts ? pkg.scripts : {}; + pkg.scripts = pkg.scripts ? pkg.scripts : {}; + + const s = pkg.scripts; if (s.test && s.test !== DEFAULT_TEST_SCRIPT) { s.test = s.test.replace(/\bnode (test\/)?test\.js\b/, cmd); |