Skip to content

Commit

Permalink
Require Node.js 10 and upgrade Mocha
Browse files Browse the repository at this point in the history
Closes #203
Fixes #202
  • Loading branch information
sindresorhus committed Feb 18, 2021
1 parent 93e1cbc commit 4fa531f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
19 changes: 10 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
"description": "Run Mocha tests",
"license": "MIT",
"repository": "sindresorhus/gulp-mocha",
"funding": "https://github.com/sponsors/sindresorhus",
"author": {
"name": "Sindre Sorhus",
"email": "[email protected]",
"url": "sindresorhus.com"
"url": "https://sindresorhus.com"
},
"engines": {
"node": ">=8"
"node": ">=10"
},
"scripts": {
"test": "xo && ava"
Expand All @@ -35,18 +36,18 @@
],
"dependencies": {
"dargs": "^7.0.0",
"execa": "^2.0.4",
"mocha": "^6.2.0",
"execa": "^5.0.0",
"mocha": "^8.3.0",
"plugin-error": "^1.0.1",
"supports-color": "^7.0.0",
"through2": "^3.0.1"
"supports-color": "^8.1.1",
"through2": "^4.0.2"
},
"devDependencies": {
"ava": "^2.3.0",
"gulp": "^4.0.2",
"p-event": "^4.1.0",
"vinyl": "^2.1.0",
"xo": "^0.24.0"
"p-event": "^4.2.0",
"vinyl": "^2.2.1",
"xo": "^0.37.1"
},
"peerDependencies": {
"gulp": ">=4"
Expand Down
2 changes: 1 addition & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import path from 'path';
import test from 'ava';
import Vinyl from 'vinyl';
import pEvent from 'p-event';
import mocha from '..';
import mocha from '../index.js';

function fixture(name) {
const fileName = path.join(__dirname, 'fixtures', name);
Expand Down
4 changes: 2 additions & 2 deletions test/utils.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import test from 'ava';
import m from '../utils';
import utils from '../utils.js';

test('convertObjectToList produces a comma separated string of k=v', t => {
t.is(
m.convertObjectToList({key1: 'value1', key2: 'value2', key99: 'value99'}),
utils.convertObjectToList({key1: 'value1', key2: 'value2', key99: 'value99'}),
'key1=value1,key2=value2,key99=value99'
);
});
2 changes: 2 additions & 0 deletions utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

function convertObjectToList(object) {
return Object.entries(object)
// TODO: Stop using `.reduce`
// eslint-disable-next-line unicorn/no-array-reduce
.reduce((result, current) => result.concat(`${current[0]}=${current[1]}`), [])
.join(',');
}
Expand Down

0 comments on commit 4fa531f

Please sign in to comment.