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

[WIP] Deno_std Browser testing #335

Closed
wants to merge 2 commits into from
Closed

[WIP] Deno_std Browser testing #335

wants to merge 2 commits into from

Conversation

zekth
Copy link
Contributor

@zekth zekth commented Apr 12, 2019

as mentionned in: #333
Here is a draft of e2e testing in chrome headless browser using puppeteer.

First of all there is some additionnal step to setup the environment:

npm install puppeteer # This will provide the binary to use chrome Headless

In the ./strings/e2e/ folder there is 2 files:

  • test.e2e.js : This is the description of the test using puppeteer
  • test.html : File to be served througth the http server to test the module

How the test is done:

  • start http/file_server.ts
  • node ./strings/e2e/test.e2e.js
  • stop http/file_server.ts

If the test pass the console prompt OK, otherwise FAILED. And we inspect the output.

Also i'd prefer to use the same asserts as the tests itselves and use a more generic way to implement Browser testing. Any idea is welcome.

Added to this, once denoland/deno#2089 will land it will be easier to wrap everything in a more generic approach.

NOTE: Atm it's using the default chrome path. There is some differences between environment, got to fix it.

@zekth zekth closed this Apr 30, 2019
@zekth zekth deleted the browser-test branch April 30, 2019 16:25
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