Skip to content

Commit

Permalink
Merge pull request #51 from ThomasDenoncin/chai-5-support
Browse files Browse the repository at this point in the history
Update for Chai 5 support
  • Loading branch information
mesaugat authored Jul 14, 2024
2 parents f3bd955 + c3a2e0c commit 670906b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 18 deletions.
9 changes: 0 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,6 @@ yarn add chai-exclude --dev

## Usage

### Require

```js
const chai = require('chai');
const chaiExclude = require('chai-exclude');

chai.use(chaiExclude);
```

### ES6 Import

```js
Expand Down
6 changes: 3 additions & 3 deletions chai-exclude.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const fclone = require('fclone')
import fclone from 'fclone'

function chaiExclude (chai, utils) {
const assert = chai.assert
Expand Down Expand Up @@ -215,5 +215,5 @@ function chaiExclude (chai, utils) {
Assertion.overwriteChainableMethod('includes', removeKeysAndAssert, keepChainingBehavior)
}

module.exports = chaiExclude
module.exports.default = chaiExclude // for Typescript
const _default = chaiExclude // for Typescript
export default _default
6 changes: 2 additions & 4 deletions chai-exclude.test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
/* eslint-env mocha */

const { use, assert, expect } = require('chai')

const chaiExclude = require('./chai-exclude')
import { use, assert, expect } from 'chai'
import chaiExclude from './chai-exclude.js'

use(chaiExclude)

Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"author": "Saugat Acharya <mesaugat@gmail.com>",
"license": "MIT",
"homepage": "https://github.com/mesaugat/chai-exclude",
"type": "module",
"files": [
"chai-exclude.js",
"index.d.ts"
Expand All @@ -33,7 +34,7 @@
},
"devDependencies": {
"@types/chai": "^4.3.4",
"chai": "^4.3.7",
"chai": "^5.0.0",
"mocha": "^10.2.0",
"standard": "^17.0.0",
"tsd": "^0.25.0"
Expand All @@ -42,6 +43,6 @@
"fclone": "^1.0.11"
},
"peerDependencies": {
"chai": ">= 4.0.0 < 5"
"chai": ">= 5"
}
}

0 comments on commit 670906b

Please sign in to comment.