File tree Expand file tree Collapse file tree 4 files changed +31
-6
lines changed Expand file tree Collapse file tree 4 files changed +31
-6
lines changed Original file line number Diff line number Diff line change 1616 "prepublish": { "scripts": ["npm run eslint", "npm run test-scripts"] }
1717 },
1818
19+ "runner":
20+ {
21+ "scripts": ["cp ./test-src/data/test.json ./test-src/dist/test.json"]
22+ },
23+
1924 "test":
2025 {
2126 // Provides a report handling command that is executed after running tests / coverage when running on Travis CI.
Original file line number Diff line number Diff line change 11{
22 "name" : " typhonjs-npm-build-test" ,
3- "version" : " 0.2 .0" ,
3+ "version" : " 0.3 .0" ,
44 "homepage" : " https://github.com/typhonjs-node-npm-scripts/typhonjs-npm-build-test" ,
55 "description" : " Provides a unified set of NPM scripts and dependencies for building and testing ES6 NPM modules for TyphonJS and beyond." ,
66 "license" : " MPL-2.0" ,
2020 "dependencies" : {
2121 "typhonjs-istanbul-instrument-jspm" : " ^0.1.0" ,
2222 "typhonjs-node-esdoc" : " ^0.2.0" ,
23- "typhonjs-npm-scripts-build-babel" : " ^0.2.0" ,
24- "typhonjs-npm-scripts-publish" : " ^0.1.0" ,
25- "typhonjs-npm-scripts-test-mocha" : " ^0.2.0"
23+ "typhonjs-npm-scripts-build-babel" : " ^0.3.0" ,
24+ "typhonjs-npm-scripts-publish" : " ^0.2.0" ,
25+ "typhonjs-npm-scripts-test-mocha" : " ^0.2.0" ,
26+ "typhonjs-npm-scripts-runner" : " ^0.1.0"
2627 },
2728 "devDependencies" : {
2829 "typhonjs-config-eslint" : " ^0.4.0"
Original file line number Diff line number Diff line change @@ -10,7 +10,9 @@ fs.emptyDirSync('./coverage-test');
1010 * `../../node_modules/typhonjs-npm-scripts-build-babel/scripts/build.js`
1111 * `../../node_modules/typhonjs-npm-scripts-test-mocha/scripts/test.js`
1212 * `../../node_modules/typhonjs-npm-scripts-test-mocha/scripts/test-coverage.js`
13- * `../../node_modules/typhonjs-npm-scripts-publish/scripts/prepublish.js`
13+ *
14+ * Runs the following module:
15+ * `typhonjs-npm-scripts-runner`
1416 *
1517 * @test {onHandleCode}
1618 */
@@ -19,7 +21,7 @@ describe('Script Test', function()
1921 /**
2022 * Test `../../node_modules/typhonjs-npm-scripts-build-babel/scripts/build.js`.
2123 */
22- it ( 'build' , function ( )
24+ it ( 'babel build' , function ( )
2325 {
2426 fs . emptyDirSync ( './test-src/dist' ) ;
2527
@@ -113,4 +115,20 @@ describe('Script Test', function()
113115
114116 process . chdir ( cwd ) ;
115117 } ) ;
118+
119+ /**
120+ * Test `typhonjs-npm-scripts-runner`.
121+ */
122+ it ( 'runner' , function ( )
123+ {
124+ fs . emptyDirSync ( './test-src/dist' ) ;
125+
126+ var runner = require ( 'typhonjs-npm-scripts-runner' ) ;
127+
128+ runner . run ( './.npmscriptrc' , 'runner.scripts' ) ;
129+
130+ assert ( fs . statSync ( './test-src/dist/test.json' ) . isFile ( ) ) ;
131+
132+ fs . emptyDirSync ( './test-src/dist' ) ;
133+ } ) ;
116134} ) ;
Original file line number Diff line number Diff line change 1+ {}
You can’t perform that action at this time.
0 commit comments