-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Conversation
Quality Gate passedIssues Measures |
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
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
// 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
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
*/ | ||
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
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
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.