test: e2e windows compatibility (#861)

* test: e2e compatible with windows
* chore: mongoose type fix
This commit is contained in:
Dan Ribbens
2022-08-01 15:21:25 -04:00
committed by GitHub
parent 2f86a39e38
commit da2a262208
4 changed files with 169 additions and 168 deletions

View File

@@ -1,8 +1,10 @@
/* eslint-disable import/no-extraneous-dependencies, no-console */
import path from 'path';
import shelljs from 'shelljs';
import glob from 'glob';
import slash from 'slash';
shelljs.env.DISABLE_LOGGING = 'true';
const playwrightBin = path.resolve(__dirname, '../node_modules/.bin/playwright');
@@ -42,7 +44,7 @@ function executePlaywright(suitePath: string, bail = false) {
`${bail ? 'playwright.bail.config.ts' : 'playwright.config.ts'}`,
);
const cmd = `DISABLE_LOGGING=true ${playwrightBin} test ${suitePath} -c ${playwrightCfg}`;
const cmd = slash(`${playwrightBin} test ${suitePath} -c ${playwrightCfg}`);
console.log('\n', cmd);
const { stdout, code } = shelljs.exec(cmd);
const suite = path.basename(path.dirname(suitePath));