@brillout/test-e2e 0.6.7 → 0.6.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/getConfig.js +1 -15
- package/package.json +1 -1
package/dist/getConfig.js
CHANGED
|
@@ -2,7 +2,7 @@ export { getConfig };
|
|
|
2
2
|
export { loadConfig };
|
|
3
3
|
import path from 'path';
|
|
4
4
|
import fs from 'fs';
|
|
5
|
-
import { assert, assertUsage, fsWindowsBugWorkaround,
|
|
5
|
+
import { assert, assertUsage, fsWindowsBugWorkaround, isObject } from './utils.js';
|
|
6
6
|
const configFileName = 'test-e2e.config.mjs';
|
|
7
7
|
let config = null;
|
|
8
8
|
function getConfig() {
|
|
@@ -22,20 +22,6 @@ async function loadConfig() {
|
|
|
22
22
|
}
|
|
23
23
|
function assertConfig(config) {
|
|
24
24
|
assertUsage(isObject(config), `${configFileName} default export should be an object`);
|
|
25
|
-
Object.entries(config).forEach(([key, val]) => {
|
|
26
|
-
const wrongType = `${configFileName} export default { ${key} } should be a`;
|
|
27
|
-
if (key === 'tolerateError') {
|
|
28
|
-
assertUsage(isCallable(val), `${wrongType} function`);
|
|
29
|
-
}
|
|
30
|
-
else if (key === 'ci') {
|
|
31
|
-
// Only used by .github/workflows/ci/getTestJobs.mjs
|
|
32
|
-
// https://github.com/brillout/vite-plugin-ssr/blob/4fa329e4081655c39c4c70436ae73e563489439e/.github/workflows/ci/getTestJobs.mjs#L72
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
// assertUsage(false, `${configFileName} unknown config ${key}`)
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
25
|
}
|
|
40
26
|
function find() {
|
|
41
27
|
let dir = process.cwd();
|