add test script to node
This commit is contained in:
parent
b0d34e4cd2
commit
53e0f0569f
@ -45,7 +45,7 @@ async function run (folder, args) {
|
|||||||
{ cwd: snip_folder, stdio: 'inherit' }
|
{ cwd: snip_folder, stdio: 'inherit' }
|
||||||
);
|
);
|
||||||
child_process.execSync (
|
child_process.execSync (
|
||||||
'yarn add --dev @scode/eslint-config eslint',
|
'yarn add --dev @scode/eslint-config eslint nyc ava',
|
||||||
{ cwd: snip_folder, stdio: 'inherit' }
|
{ cwd: snip_folder, stdio: 'inherit' }
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -53,7 +53,7 @@ async function run (folder, args) {
|
|||||||
await fs.readFile (path.join (snip_folder, 'package.json'), 'utf-8')
|
await fs.readFile (path.join (snip_folder, 'package.json'), 'utf-8')
|
||||||
);
|
);
|
||||||
|
|
||||||
package_json.scripts = { lint: 'eslint .' };
|
package_json.scripts = { lint: 'eslint .', test: 'nyc ava' };
|
||||||
|
|
||||||
await fs.writeFile (
|
await fs.writeFile (
|
||||||
path.join (snip_folder, 'package.json'),
|
path.join (snip_folder, 'package.json'),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user