Skip to content

Commit 225d355

Browse files
committed
Update readme.md
1 parent c200914 commit 225d355

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

readme.md

+8-11
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ $ npm install --save-dev gulp-mocha
1515
## Usage
1616

1717
```js
18-
var gulp = require('gulp');
19-
var mocha = require('gulp-mocha');
18+
const gulp = require('gulp');
19+
const mocha = require('gulp-mocha');
2020

21-
gulp.task('default', function () {
21+
gulp.task('default', () => {
2222
return gulp.src('test.js', {read: false})
2323
// gulp-mocha needs filepaths so you can't have any plugins before it
2424
.pipe(mocha({reporter: 'nyan'}));
@@ -97,25 +97,22 @@ Require custom modules before tests are run.
9797
If your test suite is not exiting it might be because you still have a lingering callback, most often caused by an open database connection. You should close this connection or do the following:
9898

9999
```js
100-
gulp.task('default', function () {
100+
gulp.task('default', () => {
101101
return gulp.src('test.js')
102102
.pipe(mocha())
103-
.once('error', function () {
103+
.once('error', () => {
104104
process.exit(1);
105105
})
106-
.once('end', function () {
106+
.once('end', () => {
107107
process.exit();
108108
});
109109
});
110110
```
111111

112-
### CoffeeScript
113-
114-
Add `require('coffee-script/register')` to the top of your `gulpfile.js`.
115-
116112
### Babel
117113

118-
Add `require('babel/register')` to the top of your `gulpfile.js`.
114+
Add `require('babel-core/register');` to the top of your `gulpfile.js`. Make sure to read the [Babel docs](https://babeljs.io/docs/usage/require/).
115+
119116

120117
## License
121118

0 commit comments

Comments
 (0)