Skip to content

Commit

Permalink
[OGUI-1560] Migrate QCG test setup to use NodeJS test runner instead …
Browse files Browse the repository at this point in the history
…of mocha and nyc (#2635)

* updates the QCG test base to use NodeJS test-runner instead of Mocha and Nyc. 
* updates the GH workflow of QCG to use the new setup
* removes integration tests folder as these are being run on FLP side now
* brings all included test files to a standard naming convention (remaining ones are not yet included in test runs)
* this is needed to ensure framework imported tests (ES6 required only) are waiting for the parent test `before` hooks which are setting up the test server and browser page.
  • Loading branch information
graduta authored Oct 24, 2024
1 parent d1328a2 commit 1038f9f
Show file tree
Hide file tree
Showing 25 changed files with 754 additions and 2,921 deletions.
1 change: 0 additions & 1 deletion .github/workflows/qc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ jobs:
node-version: '20.x'
- run: (cd QualityControl; npm ci )
- run: (cd QualityControl; npm run coverage )
- run: (cd QualityControl; ./node_modules/.bin/nyc report --reporter=text-lcov > coverage.lcov)
- name: Send codecov report for QualityControl
uses: codecov/codecov-action@v4
with:
Expand Down
3 changes: 1 addition & 2 deletions QualityControl/.gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
public/config.js
config.js
/config.js
public/config.cjs
config.cjs
*~
.DS_Store
cert/*
Expand Down
3 changes: 1 addition & 2 deletions QualityControl/lib/config/publicConfigProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ function buildPublicConfig(config) {
CONSUL_SERVICE: config.consul ? true : false,
};

const codeStr = '/* eslint-disable quote-props */\n'
+ `const publicConfig = ${JSON.stringify(publicConfig, null, 2)};\nexport { publicConfig as QCG };\n`;
const codeStr = `const publicConfig = ${JSON.stringify(publicConfig, null, 2)};\nexport { publicConfig as QCG };\n`;

writeFileSync(publicConfigPath, codeStr);
}
Expand Down
Loading

0 comments on commit 1038f9f

Please sign in to comment.