refactor: refs #6889 improve file loading logic

This commit is contained in:
Jorge Penadés 2024-05-30 14:29:13 +02:00
parent 002111d8d1
commit 8212eb82c7
1 changed files with 4 additions and 16 deletions

View File

@ -5,6 +5,7 @@ require('regenerator-runtime/runtime');
require('vn-loopback/server/boot/date')();
const getopts = require('getopts');
const fs = require('fs');
const path = require('path');
const Myt = require('@verdnatura/myt/myt');
const Run = require('@verdnatura/myt/myt-run');
@ -35,22 +36,9 @@ async function test() {
const Jasmine = require('jasmine');
const jasmine = new Jasmine();
const specFiles = [
`./e2e/paths/01*/*[sS]pec.js`,
`./e2e/paths/02*/*[sS]pec.js`,
`./e2e/paths/03*/*[sS]pec.js`,
`./e2e/paths/04*/*[sS]pec.js`,
`./e2e/paths/05*/*[sS]pec.js`,
`./e2e/paths/06*/*[sS]pec.js`,
`./e2e/paths/07*/*[sS]pec.js`,
`./e2e/paths/08*/*[sS]pec.js`,
`./e2e/paths/09*/*[sS]pec.js`,
`./e2e/paths/10*/*[sS]pec.js`,
`./e2e/paths/11*/*[sS]pec.js`,
`./e2e/paths/12*/*[sS]pec.js`,
`./e2e/paths/13*/*[sS]pec.js`,
`./e2e/paths/**/*[sS]pec.js`
];
const e2ePath = './e2e/paths';
const specFiles = fs.readdirSync(e2ePath).sort().map(folder => `${e2ePath}/${folder}/*[sS]pec.js`);
specFiles.push(`${e2ePath}/**/*[sS]pec.js`);
jasmine.loadConfig({
spec_dir: '.',