Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

test(wdio): migrate from ts-node for wdio tests #42

Closed
mohanraj-r opened this issue Oct 22, 2020 · 1 comment
Closed

test(wdio): migrate from ts-node for wdio tests #42

mohanraj-r opened this issue Oct 22, 2020 · 1 comment
Labels
enhancement New feature or request P2 Priority: Normal

Comments

@mohanraj-r
Copy link
Contributor

mohanraj-r commented Oct 22, 2020

Currently ts-node is used in wdio conf as described in TypeScript Setup · WebdriverIO

But babel with '@babel/preset-typescript' is already used for jest tests as described in Getting Started · Jest

Can we reuse babel instead as is it much more popular and actively maintained

Also ts-node seems to be resulting in some issues as described below

@mohanraj-r mohanraj-r added enhancement New feature or request P2 Priority: Normal labels Oct 22, 2020
@mohanraj-r
Copy link
Contributor Author

mohanraj-r commented Oct 22, 2020

When there is a TS warning/error, wdio runner currently skips running the tests but still reports passed with an exit status of 0

[0-0] RUNNING in chrome - /__tests__/browser-lib.test.ts
[1603406914.670][WARNING]: This version of ChromeDriver has not been tested with Chrome version 86.
[0-0] PASSED in chrome - /__tests__/browser-lib.test.ts

Spec Files:      1 passed, 1 total (100% completed) in 00:00:03

✨  Done in 4.55s.

Changing reporters (e.g. from spec to dot or concise) doesn't help (e.g. concise reports "All went well !!")

This needs to be fixed as it is misleading and could lead to issues passing undetected (e.g. in CI).
Currently to make sure that wdio tests are being run, have to closely watch the test output for signs e.g. tests names, count etc

[chrome 86.0.4240.111 mac os x #0-0] Running: chrome (v86.0.4240.111) on mac os x
[chrome 86.0.4240.111 mac os x #0-0] Session ID: dada5295279bd39d727176976a9a3b9f
[chrome 86.0.4240.111 mac os x #0-0]
[chrome 86.0.4240.111 mac os x #0-0] @sa11y/browser-lib
[chrome 86.0.4240.111 mac os x #0-0]    ✓ should not have axe or sa11y loaded to start with
[chrome 86.0.4240.111 mac os x #0-0]    ✓ should inject minified js
[chrome 86.0.4240.111 mac os x #0-0]    ✓ should inject un-minified js
[chrome 86.0.4240.111 mac os x #0-0]    ✓ should invoke functions on axe e.g. getRules
[chrome 86.0.4240.111 mac os x #0-0]    ✓ should run a11y checks using axe
[chrome 86.0.4240.111 mac os x #0-0]    ✓ should run a11y checks using sa11y
[chrome 86.0.4240.111 mac os x #0-0]    ✓ should filter a11y violations using sa11y
[chrome 86.0.4240.111 mac os x #0-0]
[chrome 86.0.4240.111 mac os x #0-0] 7 passing (3.1s)


Spec Files:      1 passed, 1 total (100% completed) in 00:00:06

✨  Done in 8.12s.

Can this issue be fixed with a ts-node config or migrating away from ts-node (to babel e.g.)

mohanraj-r added a commit to mohanraj-r/sa11y that referenced this issue Oct 27, 2020
@salesforce salesforce locked and limited conversation to collaborators Apr 15, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
enhancement New feature or request P2 Priority: Normal
Projects
None yet
Development

No branches or pull requests

1 participant