chai 4.1.0 → 4.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.mjs ADDED
@@ -0,0 +1,13 @@
1
+ import chai from './index.js';
2
+
3
+ export const expect = chai.expect;
4
+ export const version = chai.version;
5
+ export const AssertionError = chai.AssertionError;
6
+ export const util = chai.util;
7
+ export const config = chai.config;
8
+ export const use = chai.use;
9
+ export const should = chai.should;
10
+ export const assert = chai.assert;
11
+ export const core = chai.core;
12
+
13
+ export default chai;
package/karma.conf.js CHANGED
@@ -10,7 +10,13 @@ module.exports = function(config) {
10
10
  , colors: true
11
11
  , logLevel: config.LOG_INFO
12
12
  , autoWatch: false
13
- , browsers: [ 'PhantomJS' ]
13
+ , browsers: [ 'HeadlessChrome' ]
14
+ , customLaunchers: {
15
+ HeadlessChrome: {
16
+ base: 'ChromeHeadless'
17
+ , flags: [ '--no-sandbox',]
18
+ , }
19
+ , }
14
20
  , browserDisconnectTimeout: 10000
15
21
  , browserDisconnectTolerance: 2
16
22
  , browserNoActivityTimeout: 20000
package/karma.sauce.js CHANGED
@@ -26,7 +26,7 @@ module.exports = function(config) {
26
26
  }
27
27
 
28
28
  config.browsers = config.browsers.concat(browsers);
29
- config.customLaunchers = browserConfig;
29
+ Object.assign(config.customLaunchers, browserConfig);
30
30
  config.reporters.push('saucelabs');
31
31
  config.captureTimeout = 300000;
32
32
 
@@ -138,11 +138,21 @@ module.exports = function (_chai, util) {
138
138
  if (!ok) {
139
139
  msg = util.getMessage(this, arguments);
140
140
  var actual = util.getActual(this, arguments);
141
- throw new AssertionError(msg, {
141
+ var assertionErrorObjectProperties = {
142
142
  actual: actual
143
143
  , expected: expected
144
144
  , showDiff: showDiff
145
- }, (config.includeStack) ? this.assert : flag(this, 'ssfi'));
145
+ };
146
+
147
+ var operator = util.getOperator(this, arguments);
148
+ if (operator) {
149
+ assertionErrorObjectProperties.operator = operator;
150
+ }
151
+
152
+ throw new AssertionError(
153
+ msg,
154
+ assertionErrorObjectProperties,
155
+ (config.includeStack) ? this.assert : flag(this, 'ssfi'));
146
156
  }
147
157
  };
148
158
 
@@ -90,5 +90,5 @@ module.exports = {
90
90
  * @api public
91
91
  */
92
92
 
93
- proxyExcludedKeys: ['then', 'inspect', 'toJSON']
93
+ proxyExcludedKeys: ['then', 'catch', 'inspect', 'toJSON']
94
94
  };