forked from OraOpenSource/apex-nitro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.js
45 lines (36 loc) · 1.03 KB
/
test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/* eslint capitalized-comments: ["error", "never"] */
import test from 'ava';
// const fs = require('fs');
// const path = require('path');
const util = require('./lib/util/util');
const validations = require('./lib/util/validations');
// const launch = require('./lib/commands/launch');
// const originalCwd = process.cwd();
// recursive loop through a given folder to find all files
// round here https://stackoverflow.com/a/20525865/2524979
// function getFiles(dir, files = []) {
// fs.readdirSync(dir).forEach(filename => {
// const filepath = path.join(dir, filename);
// if (fs.statSync(filepath).isDirectory()) {
// getFiles(filepath, files);
// } else {
// files.push(path.resolve(filepath));
// }
// });
// return files;
// }
test('src-dist-invalid', t => {
try {
validations.srcDistFolders({
srcFolder: 'test',
distFolder: 'test'
});
} catch (error) {
t.pass();
}
});
test('pad-str', t => {
if (util.padStr('test', '.js') === 'test.js' && util.padStr('test.js', '.js') === 'test.js') {
t.pass();
}
});