Test scripting updates
This commit is contained in:
@ -33,8 +33,8 @@
|
|||||||
"extractor": "node ./scripts/extract.js",
|
"extractor": "node ./scripts/extract.js",
|
||||||
"packager": "node ./scripts/module.js",
|
"packager": "node ./scripts/module.js",
|
||||||
"localizer": "node ./scripts/localize.js",
|
"localizer": "node ./scripts/localize.js",
|
||||||
"test": "tape test/**/*.test.js | tap-spec",
|
"testold": "tape test/**/*.test.js | tap-spec",
|
||||||
"test2": "jest test/**/*.test.js"
|
"test": "jest test/**/*.test.js"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
@ -64,16 +64,10 @@ snippetFiles
|
|||||||
|
|
||||||
// Export template for snippetName.test.js which generates a example test & other information
|
// Export template for snippetName.test.js which generates a example test & other information
|
||||||
const exportTest = [
|
const exportTest = [
|
||||||
`const test = require('tape');`,
|
`const expect = require('expect');`,
|
||||||
`const ${fileName} = require('./${fileName}.js');`,
|
`const ${fileName} = require('./${fileName}.js');`,
|
||||||
`\ntest('Testing ${fileName}', (t) => {`,
|
`\ntest('${fileName} is a Function', () => {`,
|
||||||
` //For more information on all the methods supported by tape\n //Please go to https://github.com/substack/tape`,
|
` expect(${fileName}).toBeInstanceOf(Function);`,
|
||||||
` t.true(typeof ${fileName} === 'function', '${fileName} is a Function');`,
|
|
||||||
` //t.deepEqual(${fileName}(args..), 'Expected');`,
|
|
||||||
` //t.equal(${fileName}(args..), 'Expected');`,
|
|
||||||
` //t.false(${fileName}(args..), 'Expected');`,
|
|
||||||
` //t.throws(${fileName}(args..), 'Expected');`,
|
|
||||||
` t.end();`,
|
|
||||||
`});`
|
`});`
|
||||||
].join('\n');
|
].join('\n');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user