Skip to content

Commit

Permalink
Update assertion-error to it's latest major version! (#1543)
Browse files Browse the repository at this point in the history
* update assertion-error

* update `assertion-error` once more

* update expected string in test
  • Loading branch information
koddsson committed Oct 21, 2023
1 parent 528f4da commit 54d3e6b
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion lib/chai.js
Expand Up @@ -5,7 +5,7 @@
*/

import * as util from './chai/utils/index.js';
import AssertionError from 'assertion-error';
import {AssertionError} from 'assertion-error';
import {config} from './chai/config.js';
import './chai/core/assertions.js';
import {expect} from './chai/interface/expect.js';
Expand Down
2 changes: 1 addition & 1 deletion lib/chai/assertion.js
Expand Up @@ -6,7 +6,7 @@
*/

import {config} from './config.js';
import AssertionError from 'assertion-error';
import {AssertionError} from 'assertion-error';
import * as util from './utils/index.js';

/*!
Expand Down
2 changes: 1 addition & 1 deletion lib/chai/core/assertions.js
Expand Up @@ -6,7 +6,7 @@
*/

import {Assertion} from '../assertion.js';
import AssertionError from 'assertion-error';
import {AssertionError} from 'assertion-error';
import * as _ from '../utils/index.js';

const {flag} = _;
Expand Down
2 changes: 1 addition & 1 deletion lib/chai/interface/assert.js
Expand Up @@ -6,7 +6,7 @@

import {Assertion} from '../assertion.js';
import {flag, inspect} from '../utils/index.js';
import AssertionError from 'assertion-error';
import {AssertionError} from 'assertion-error';

/**
* ### assert(expression, message)
Expand Down
2 changes: 1 addition & 1 deletion lib/chai/interface/expect.js
Expand Up @@ -5,7 +5,7 @@
*/

import {Assertion} from '../assertion.js';
import AssertionError from 'assertion-error';
import {AssertionError} from 'assertion-error';

function expect(val, message) {
return new Assertion(val, message);
Expand Down
2 changes: 1 addition & 1 deletion lib/chai/interface/should.js
Expand Up @@ -5,7 +5,7 @@
*/

import {Assertion} from '../assertion.js';
import AssertionError from 'assertion-error';
import {AssertionError} from 'assertion-error';

function loadShould () {
// explicitly define this method as function as to have it's name to include as `ssfi`
Expand Down
2 changes: 1 addition & 1 deletion lib/chai/utils/expectTypes.js
Expand Up @@ -18,7 +18,7 @@
* @api public
*/

import AssertionError from 'assertion-error';
import {AssertionError} from 'assertion-error';
import {flag} from './flag.js';
import {type} from './type-detect.js';

Expand Down
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -43,7 +43,7 @@
"node": ">=12"
},
"dependencies": {
"assertion-error": "^1.1.0",
"assertion-error": "^2.0.1",
"check-error": "^2.0.0",
"deep-eql": "^5.0.0",
"loupe": "^3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion test/globalErr.js
Expand Up @@ -161,7 +161,7 @@ describe('globalErr', function () {
it('should throw if object val\'s props are not included in error object', function () {
err(function () {
err(function () { throw new Err('cat') }, {text: 'cat'});
}, /expected AssertionError{ message: 'cat', …\(2\) } to have property \'text\'/);
}, /expected AssertionError: cat to have property \'text\'/);

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

0 comments on commit 54d3e6b

Please sign in to comment.