Skip to content

Commit 54d3e6b

Browse files
author
Kristján Oddsson
authored
Update assertion-error to it's latest major version! (#1543)
* update assertion-error * update `assertion-error` once more * update expected string in test
1 parent 528f4da commit 54d3e6b

File tree

10 files changed

+14
-14
lines changed

10 files changed

+14
-14
lines changed

lib/chai.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66

77
import * as util from './chai/utils/index.js';
8-
import AssertionError from 'assertion-error';
8+
import {AssertionError} from 'assertion-error';
99
import {config} from './chai/config.js';
1010
import './chai/core/assertions.js';
1111
import {expect} from './chai/interface/expect.js';

lib/chai/assertion.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77

88
import {config} from './config.js';
9-
import AssertionError from 'assertion-error';
9+
import {AssertionError} from 'assertion-error';
1010
import * as util from './utils/index.js';
1111

1212
/*!

lib/chai/core/assertions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77

88
import {Assertion} from '../assertion.js';
9-
import AssertionError from 'assertion-error';
9+
import {AssertionError} from 'assertion-error';
1010
import * as _ from '../utils/index.js';
1111

1212
const {flag} = _;

lib/chai/interface/assert.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import {Assertion} from '../assertion.js';
88
import {flag, inspect} from '../utils/index.js';
9-
import AssertionError from 'assertion-error';
9+
import {AssertionError} from 'assertion-error';
1010

1111
/**
1212
* ### assert(expression, message)

lib/chai/interface/expect.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66

77
import {Assertion} from '../assertion.js';
8-
import AssertionError from 'assertion-error';
8+
import {AssertionError} from 'assertion-error';
99

1010
function expect(val, message) {
1111
return new Assertion(val, message);

lib/chai/interface/should.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66

77
import {Assertion} from '../assertion.js';
8-
import AssertionError from 'assertion-error';
8+
import {AssertionError} from 'assertion-error';
99

1010
function loadShould () {
1111
// explicitly define this method as function as to have it's name to include as `ssfi`

lib/chai/utils/expectTypes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* @api public
1919
*/
2020

21-
import AssertionError from 'assertion-error';
21+
import {AssertionError} from 'assertion-error';
2222
import {flag} from './flag.js';
2323
import {type} from './type-detect.js';
2424

package-lock.json

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"node": ">=12"
4444
},
4545
"dependencies": {
46-
"assertion-error": "^1.1.0",
46+
"assertion-error": "^2.0.1",
4747
"check-error": "^2.0.0",
4848
"deep-eql": "^5.0.0",
4949
"loupe": "^3.0.0",

test/globalErr.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ describe('globalErr', function () {
161161
it('should throw if object val\'s props are not included in error object', function () {
162162
err(function () {
163163
err(function () { throw new Err('cat') }, {text: 'cat'});
164-
}, /expected AssertionError{ message: 'cat', \(2\) } to have property \'text\'/);
164+
}, /expected AssertionError: cat to have property \'text\'/);
165165

166166
err(function () {
167167
err(function () { throw new Err('cat') }, {message: 'dog'});

0 commit comments

Comments
 (0)