1
0
mirror of https://gitlab.com/timvisee/send.git synced 2024-11-13 14:42:38 +01:00
send/test/frontend/index.js
2018-03-02 13:58:05 -08:00

17 lines
401 B
JavaScript

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 = "require('fast-text-encoding');\n" + files.map(kv).join(';\n');
return {
code,
dependencies: files.map(f => require.resolve('./tests/' + f)),
cacheable: true
};
};