Comments (4)
-
You need to add a babel config (see our example)
-
Inside the file which runs mocha (e.g. run_mocha.js) require the babel hook.
So this:
const fs = require('fs');
const path = require('path');
const Mocha = require('mocha');
// Instantiate a Mocha with options
const mocha = new Mocha({
reporter: 'list',
});
Becomes
require("@babel/register");
const fs = require('fs');
const path = require('path');
const Mocha = require('mocha');
// Instantiate a Mocha with options
const mocha = new Mocha({
reporter: 'list',
});
Hopefully that will work for you. Please let me know.
from mocha-examples.
Hi Craig, thanks for helping i found the appropriate documentation later and I was away for a while to respond thanks for closing.
from mocha-examples.
@neghani has there been any movement on this? Will close if do not hear back soon.
from mocha-examples.
Closing as seems nothing outstanding.
from mocha-examples.
Related Issues (20)
- selenium test is not working in latest chrome HOT 1
- Run all tests on CI HOT 5
- Broken link in docs HOT 1
- How to pass variables from a --file setup to all the tests? HOT 6
- Typescript root level hooks HOT 5
- typescript with ts-node and ESM support HOT 7
- Add an example for job summary HOT 4
- Add more examples for Express.js HOT 1
- typescript examples with commonjs not work with latest versuin, looks like mocha supports only esm
- Example needed for cli testing tool
- Remote control rauter
- TypeError: Unknown file extension ".ts" | HOT 7
- 🛠️ Repo: Move from TSLint to ESLint
- 🚀 Feature: Add examples for more modern on-the-fly transpilation tools
- 🚀 Feature: Add example of usage in a CommonJS project with Chai 5.x (ESM-only) HOT 1
- Improving test isolation in Workflow
- 🚀 Feature: Add example of a browser test
- 🚀 Feature: Add example with the xunit reporter
- 🚀 Feature: Add an example showing mocha+browser and mocha+node, where node imports JSDOM and browser uses global.window HOT 1
- 🚀 Feature: Add an example with the tdd UI
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mocha-examples.