Skip to content

Commit

Permalink
feat: auto fix test:watch script
Browse files Browse the repository at this point in the history
  • Loading branch information
ybiquitous committed Aug 30, 2017
1 parent 2e859ef commit 0bce1f2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ module.exports = async function init(basedir = process.cwd()) {
targetProps.forEach((prop) => {
packageInfo[prop] = { ...originalPackage[prop], ...packageInfo[prop] }
})
packageInfo.scripts['test:watch'] = `${packageInfo.scripts.test} --watch`

await writeFile(packageFile, `${JSON.stringify(packageInfo, null, 2)}\n`)

Expand Down
2 changes: 1 addition & 1 deletion src/init.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ test('init', async (t) => {
release: 'standard-version',
'release:dry-run': 'standard-version --dry-run',
test: 'abc',
'test:watch': 'ava --watch',
'test:watch': 'abc --watch',
})
t.deepEqual(pkg['lint-staged'], {
'*.{js,jsx}': [
Expand Down

0 comments on commit 0bce1f2

Please sign in to comment.