Skip to content

Commit

Permalink
Convert package to esm (#161)
Browse files Browse the repository at this point in the history
  • Loading branch information
robinbisping authored May 13, 2024
1 parent e23406f commit 7341f93
Show file tree
Hide file tree
Showing 16 changed files with 2,069 additions and 1,449 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"es6": false
},
"parserOptions": {
"ecmaVersion": 5
"ecmaVersion": 6,
"sourceType": "module"
},
"rules": {
// Possible errors
Expand Down
5 changes: 0 additions & 5 deletions .mocharc.js

This file was deleted.

3 changes: 3 additions & 0 deletions .mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"require": "./test/common.js"
}
22 changes: 2 additions & 20 deletions lib/sinon-chai.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,6 @@
"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 <script> tag): plug in to global chai instance directly.
/* global chai: false */
chai.use(sinonChai);
}
}(function (chai, utils) {
export default function (chai, utils) {
var slice = Array.prototype.slice;

function isSpy(putativeSpy) {
Expand Down Expand Up @@ -146,4 +128,4 @@
sinonMethod("calledWithMatch", "been called with arguments matching %*", "%D");
sinonMethod("returned", "returned %1");
exceptionalSinonMethod("thrown", "threw", "thrown %1");
}));
}
Loading

0 comments on commit 7341f93

Please sign in to comment.