some frontend unit tests
This commit is contained in:
parent
4929437283
commit
78728ce4ca
24 changed files with 708 additions and 417 deletions
16
test/frontend/index.js
Normal file
16
test/frontend/index.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
function kv(f) {
|
||||
return `require('./tests/${f}')`;
|
||||
}
|
||||
|
||||
module.exports = function() {
|
||||
const files = fs.readdirSync(path.join(__dirname, 'tests'));
|
||||
const code = files.map(kv).join(';\n');
|
||||
return {
|
||||
code,
|
||||
dependencies: files.map(f => require.resolve('./tests/' + f)),
|
||||
cacheable: false
|
||||
};
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue