unexpected
Advanced tools
Comparing version 11.6.0 to 11.6.1
@@ -1,3 +0,2 @@ | ||
var Context = function Context(expect) { | ||
this.expect = expect; | ||
var Context = function Context() { | ||
this.level = 0; | ||
@@ -4,0 +3,0 @@ }; |
@@ -187,3 +187,3 @@ var createStandardErrorMessage = require('./createStandardErrorMessage'); | ||
? context | ||
: new Context(expect); | ||
: new Context(); | ||
@@ -1530,3 +1530,6 @@ if ( | ||
if (assertionRule.expect && assertionRule.expect !== this._topLevelExpect) { | ||
return assertionRule.expect.apply(assertionRule, [ subject, testDescriptionString ].concat( args )); | ||
return assertionRule.expect._expect(context, [ | ||
subject, | ||
testDescriptionString ].concat( args | ||
)); | ||
} | ||
@@ -1766,3 +1769,3 @@ | ||
(ref = this$1.context.expect).fail.apply(ref, args); | ||
(ref = this$1._topLevelExpect)._fail.apply(ref, args); | ||
}); | ||
@@ -2035,3 +2038,3 @@ } else { | ||
return expect._expect(new Context(expect), args); | ||
return expect._expect(new Context(), args); | ||
}; | ||
@@ -2038,0 +2041,0 @@ utils.setPrototypeOfOrExtend(expect, expectPrototype); |
class Context { | ||
constructor(expect) { | ||
this.expect = expect; | ||
constructor() { | ||
this.level = 0; | ||
@@ -5,0 +4,0 @@ } |
@@ -181,3 +181,3 @@ const createStandardErrorMessage = require('./createStandardErrorMessage'); | ||
? context | ||
: new Context(expect); | ||
: new Context(); | ||
@@ -751,5 +751,3 @@ if ( | ||
throw new Error( | ||
`Type ${ | ||
type.name | ||
} must specify an identify function or be declared abstract by setting identify to false` | ||
`Type ${type.name} must specify an identify function or be declared abstract by setting identify to false` | ||
); | ||
@@ -1449,3 +1447,7 @@ } | ||
if (assertionRule.expect && assertionRule.expect !== this._topLevelExpect) { | ||
return assertionRule.expect(subject, testDescriptionString, ...args); | ||
return assertionRule.expect._expect(context, [ | ||
subject, | ||
testDescriptionString, | ||
...args | ||
]); | ||
} | ||
@@ -1669,3 +1671,3 @@ | ||
this._callInNestedContext(() => { | ||
this.context.expect.fail(...args); | ||
this._topLevelExpect._fail(...args); | ||
}); | ||
@@ -1925,3 +1927,3 @@ } else { | ||
const expect = function(...args) { | ||
return expect._expect(new Context(expect), args); | ||
return expect._expect(new Context(), args); | ||
}; | ||
@@ -1928,0 +1930,0 @@ utils.setPrototypeOfOrExtend(expect, expectPrototype); |
{ | ||
"name": "unexpected", | ||
"version": "11.6.0", | ||
"version": "11.6.1", | ||
"author": "Sune Sloth Simonsen <sune@we-knowhow.dk>", | ||
@@ -63,11 +63,11 @@ "keywords": [ | ||
"offline-github-changelog": "^1.6.1", | ||
"prettier": "~1.17.0", | ||
"prettier": "~1.18.2", | ||
"rollup": "^1.0.1", | ||
"rollup-plugin-commonjs": "^10.0.0", | ||
"rollup-plugin-node-globals": "^1.1.0", | ||
"rollup-plugin-node-resolve": "^4.0.0", | ||
"rollup-plugin-node-resolve": "^5.0.0", | ||
"rollup-plugin-terser": "^5.0.0", | ||
"rollup-plugin-uglify": "^6.0.0", | ||
"rsvp": "^4.7.0", | ||
"serve": "*", | ||
"uglify-js": "3.5.12", | ||
"unexpected-documentation-site-generator": "^6.0.0", | ||
@@ -74,0 +74,0 @@ "unexpected-magicpen": "^1.0.0", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
1898040
53
15728
6