Skip to content

Latest commit

 

History

History

example

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

browser-tap example project

This project demonstrates how to:

  • use babel-plugin-discard-module-references
    • to drop all tape based tests
    • including whitelisting the react module
  • use browser-tap to run tests
    • dev: in the browser
    • CI: in a headless browser (electron)
  • write tests on React components using enzyme and sinon

Most interesting files are:

Scripts

Serve in dev mode (includes tests and live reload)

npm install
npm dev
open http://localhost:8080

Serve production mode (no tests, optimized but with live reload)

npm install
npm start # equivalent of NODE_ENV=production npm run dev

Build for production

npm install
npm run build

You can now simply serve the public folder.

Run tests in CI mode (in electron)

npm install
npm test