Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update assertion-error to it's latest major version! #1543

Merged
merged 3 commits into from
Oct 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/chai.js
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Loading