All Projects → vitalets → mocha-es6-modules

vitalets / mocha-es6-modules

Licence: other
Running Mocha tests in the browser with ES6 Modules support

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Mocha ES6 modules example

An example of running Mocha tests as a native ES6 modules in a browser.

  • If browser supports ES6 modules — the are used. 
  • If browser does not support ES6 modules — the page fallbacks to bundled script.

You can check it online in your browser.

With ES modules (Chrome >= 62):

Mocha tests With ES modules

Without ES modules (Firefox 57):

Mocha tests Without ES modules

Run locally

  1. Clone the repo:
    git clone https://github.com/vitalets/mocha-es6-modules.git
    cd mocha-es6-modules
  2. Install dependencies:
    npm install
  3. Build non-es6 version:
    npm run build
  4. Start local http server:
    npm run server
  5. Open http://localhost:8000 in browser.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].