8000 GitHub - thomasmao/front-tests: An exemple how to test your front with mocha and phantomjs
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

thomasmao/front-tests

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

An exemple how to test your front with mocha and phantomjs

Install phantomjs http://phantomjs.org/

Serve the exemple folder using pushState (use serve-filirom1)

$ serve -P exemple

Run the phantomjs script:

$ phantomjs run-mocha.js http://127.0.0.1:3000

It will print this following output:

Array
  #push()
    ✓ should append a value

    ✓ should return the length


Array
  #pop()
    ✓ should remove and return the last value

    ✓ should adjust .length


Test web
  ✓ should print `Hey guy` when clicking on link toto



✔ 5 tests complete (650ms)

Test it in a browser

Serve the exemple folder using pushState (use serve-filirom1)

$ serve -P exemple

Then inside your browser run the following command:

> mocha.run();

Thanks

This project is mainly inspired, copied from:

About

An exemple how to test your front with mocha and phantomjs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0