Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Auto generate tests for QUnit #15

Merged
merged 1 commit into from
Jun 14, 2024
Merged

feat: Auto generate tests for QUnit #15

merged 1 commit into from
Jun 14, 2024

Conversation

mauriciolauffer
Copy link
Owner

No need to create .spec or .test files anymore. Just pass a list of QUnit HTML files to the configuration and the tests will be automatically generated.

Copy link

Quality Gate Passed Quality Gate passed

Issues
5 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.4% Duplication on New Code

See analysis details on SonarCloud

try {
new URL(path, baseUrl);
return true;
} catch (err: Error | any) { // eslint-disable-line @typescript-eslint/no-explicit-any

Check failure

Code scanning / ESLint

Disallow the `any` type Error

Unexpected any. Specify a different type.
setTimeout(() => {
// Check whether tests have already been completed, QUnit event runEnd won't be triggered
if (QUnit.config?.started > 0 && QUnit.config?.queue?.length === 0) {
console.debug('QUnit.config.started:', QUnit.config?.started); // eslint-disable-line no-console

Check failure

Code scanning / ESLint

Disallow the use of `console` Error

Unexpected console statement.
// Check whether tests have already been completed, QUnit event runEnd won't be triggered
if (QUnit.config?.started > 0 && QUnit.config?.queue?.length === 0) {
console.debug('QUnit.config.started:', QUnit.config?.started); // eslint-disable-line no-console
console.debug('QUnit.config.queue.length:', QUnit.config?.queue?.length); // eslint-disable-line no-console

Check failure

Code scanning / ESLint

Disallow the use of `console` Error

Unexpected console statement.
if (QUnit.config?.started > 0 && QUnit.config?.queue?.length === 0) {
console.debug('QUnit.config.started:', QUnit.config?.started); // eslint-disable-line no-console
console.debug('QUnit.config.queue.length:', QUnit.config?.queue?.length); // eslint-disable-line no-console
console.debug('QUnit.config.pq.finished:', QUnit.config?.pq?.finished); // eslint-disable-line no-console

Check failure

Code scanning / ESLint

Disallow the use of `console` Error

Unexpected console statement.
*/
async function getQUnitResults(this: WebdriverIO.Browser): Promise<WdioQunitService.RunEndDetails> {
log.info('Getting QUnit results...');
const qunitResults = await qunitHooks(this); // eslint-disable-line no-invalid-this

Check failure

Code scanning / ESLint

Disallow use of `this` in contexts where the value of `this` is `undefined` Error

Unexpected 'this'.
interface Browser {
getQUnitResults: () => Promise<WdioQunitService.RunEndDetails>;
}
}

var _WdioQunitServiceHtmlFiles: string[]; // eslint-disable-line

Check failure

Code scanning / ESLint

Require `let` or `const` instead of `var` Error

Unexpected var, use let or const instead.
@mauriciolauffer mauriciolauffer merged commit 0b60bf5 into main Jun 14, 2024
5 of 7 checks passed
@mauriciolauffer mauriciolauffer deleted the no-specs branch June 14, 2024 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant