Skip to content
This repository has been archived by the owner on Jan 16, 2022. It is now read-only.

[ARCHIVED] Example showing tests running directly in a browser

License

Notifications You must be signed in to change notification settings

wildpeaks/2020-example-browser-tests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

JS Tests: Legacy

Option 1: run entirely in the browser.

It runs an arbitrary script in a page, and a human looks at the page to see if the result is what is expected. It's not fully automated (so you can't use that in Github Actions), but at least it gives an easy red/green status.

You can use a library like QUnit to structure the tests.

This kind of test isn't really used anymore (because they depend on a human opening the browser and reading the results), but it was the only option for a very long time, and the advantage is this works in very old browsers (and BSContact).

The other options:


Run the tests

Start a webserver to serve the files as http://localhost.

Then open http://localhost/test/index.html in your browser to see the result: green means pass, red means fail.

About

[ARCHIVED] Example showing tests running directly in a browser

Resources

License

Stars

Watchers

Forks