Updated testing with proper indentation
Uses two spaces instead of hard tabs.
This commit is contained in:
@ -23,7 +23,7 @@ const snippetFiles = [];
|
||||
|
||||
const snippetFilesActive = fs.readdirSync(SNIPPETS_ACTIVE, 'utf8').map(fileName => fileName.slice(0, -3));
|
||||
const snippetFilesArchive = fs.readdirSync(SNIPPETS_ARCHIVE, 'utf8')
|
||||
.filter(fileName => !fileName.includes('README')) // -> Filters out main README.md file in Archieve which isn't a snippet
|
||||
.filter(fileName => !fileName.includes('README')) // -> Filters out main README.md file in Archieve which isn't a snippet
|
||||
.map(fileName => fileName.slice(0, -3));
|
||||
|
||||
snippetFiles.push(...snippetFilesActive);
|
||||
@ -68,13 +68,13 @@ snippetFiles
|
||||
`const test = require('tape');`,
|
||||
`const ${fileName} = require('./${fileName}.js');`,
|
||||
`\ntest('Testing ${fileName}', (t) => {`,
|
||||
`\t//For more information on all the methods supported by tape\n\t//Please go to https://github.com/substack/tape`,
|
||||
`\tt.true(typeof ${fileName} === 'function', '${fileName} is a Function');`,
|
||||
`\t//t.deepEqual(${fileName}(args..), 'Expected');`,
|
||||
`\t//t.equal(${fileName}(args..), 'Expected');`,
|
||||
`\t//t.false(${fileName}(args..), 'Expected');`,
|
||||
`\t//t.throws(${fileName}(args..), 'Expected');`,
|
||||
`\tt.end();`,
|
||||
` //For more information on all the methods supported by tape\n //Please go to https://github.com/substack/tape`,
|
||||
` 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');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user