Browse Source

support -- --fix for test-js

Daniel Zlotin 6 years ago
parent
commit
84f05325e0
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      scripts/test-js.js

+ 3
- 1
scripts/test-js.js View File

@@ -1,6 +1,8 @@
1 1
 const exec = require('shell-utils').exec;
2 2
 const _ = require('lodash');
3 3
 
4
+const fix = _.includes(process.argv, '--fix') ? '--fix' : '';
5
+
4 6
 const dirs = [
5 7
   'lib/src',
6 8
   'integration',
@@ -13,6 +15,6 @@ run();
13 15
 
14 16
 function run() {
15 17
   const paths = _.chain(dirs).map((d) => `${d}/**/**/**/**/**/**/*`).join(' ').value();
16
-  exec.execSync(`xo ${paths}`);
18
+  exec.execSync(`xo ${paths} ${fix}`);
17 19
   exec.execSync(`jest --coverage`);
18 20
 }