Browse Source

feat(test): Added stress testing to CI

pull/4521/head
Muhammed Mustafa 2 years ago
parent
commit
465a0db921
  1. 8
      tests/playwright/scripts/stressTestNewlyAddedTest.js

8
tests/playwright/scripts/stressTestNewlyAddedTest.js

@ -5,6 +5,14 @@ const exec = util.promisify(require('child_process').exec);
// Get items from `git diff develop'
void (async () => {
const { stdout: allFileNames } = await exec('git diff --name-only origin/develop');
// return if no changed file ends with .js
const testFilesInChangedFiles = allFileNames.split('\n').filter(fileName => fileName.endsWith('.spec.ts'));
if (testFilesInChangedFiles.length === 0) {
console.log('No test file changed, skipping stress test');
return;
}
const { stdout } = await exec(`git diff origin/develop -- *.spec.ts **/*.spec.ts | grep test\\(`);
// eslint-disable-next-line no-undef
const dbType = process.env.E2E_DB_TYPE;

Loading…
Cancel
Save