diff --git a/.eslintignore b/.eslintignore index 404abb2..2fe5d09 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1 +1,2 @@ coverage/ +lib/sinon-chai.js \ No newline at end of file diff --git a/.eslintrc.json b/.eslintrc.json index f34ba89..68d3713 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -6,7 +6,11 @@ "es6": false }, "parserOptions": { - "ecmaVersion": 5 + "ecmaVersion": 2015, + "sourceType": "module", + "ecmaFeatures": { + "modules": true + } }, "rules": { // Possible errors diff --git a/.mocharc.js b/.mocharc.js index b362cda..2eca8c7 100644 --- a/.mocharc.js +++ b/.mocharc.js @@ -1,5 +1,5 @@ "use strict"; module.exports = { - require: ["./test/common"] + require: ["./test/setup.mjs"] }; diff --git a/lib/sinon-chai.js b/lib/sinon-chai.mjs similarity index 89% rename from lib/sinon-chai.js rename to lib/sinon-chai.mjs index 194dc3a..5040cd1 100644 --- a/lib/sinon-chai.js +++ b/lib/sinon-chai.mjs @@ -1,24 +1,5 @@ -"use strict"; -/* eslint-disable no-invalid-this */ - -(function (sinonChai) { - // Module systems magic dance. - - /* istanbul ignore else */ - if (typeof require === "function" && typeof exports === "object" && typeof module === "object") { - // NodeJS - module.exports = sinonChai; - } else if (typeof define === "function" && define.amd) { - // AMD - define(function () { - return sinonChai; - }); - } else { - // Other environment (usually