https://github.com/vitalets/mocha-es6-modules
Running Mocha tests in the browser with ES6 Modules support
https://github.com/vitalets/mocha-es6-modules
Last synced: 5 months ago
JSON representation
Running Mocha tests in the browser with ES6 Modules support
- Host: GitHub
- URL: https://github.com/vitalets/mocha-es6-modules
- Owner: vitalets
- Created: 2017-12-04T10:39:09.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-07-12T07:47:47.000Z (about 7 years ago)
- Last Synced: 2025-05-07T03:43:47.722Z (5 months ago)
- Language: JavaScript
- Homepage: https://vitalets.github.io/mocha-es6-modules/
- Size: 82 KB
- Stars: 13
- Watchers: 2
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Mocha ES6 modules example
An example of running [Mocha](https://mochajs.org/) tests as a native [ES6 modules](https://hacks.mozilla.org/2015/08/es6-in-depth-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](https://vitalets.github.io/mocha-es6-modules/) in your browser.
#### With ES modules (Chrome >= 62):
#### Without ES modules (Firefox 57):
## Run locally
1. Clone the repo:
```bash
git clone https://github.com/vitalets/mocha-es6-modules.git
cd mocha-es6-modules
```
2. Install dependencies:
```bash
npm install
```
3. Build non-es6 version:
```bash
npm run build
```
4. Start local http server:
```bash
npm run server
```
5. Open http://localhost:8000 in browser.