You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

jest-jasmine2

Package Overview
Dependencies
Maintainers
4
Versions
310
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-jasmine2 - npm Package Compare versions

Comparing version

to
14.3.0-alpha.d13c163e

69

build/index.js

@@ -118,38 +118,2 @@ /**

const hasIterator = object => !!(object != null && object[Symbol.iterator]);
const iterableEquality = (a, b) => {
if (
typeof a !== 'object' ||
typeof b !== 'object' ||
Array.isArray(a) ||
Array.isArray(b) ||
!hasIterator(a) ||
!hasIterator(b))
{
return undefined;
}
if (a.constructor !== b.constructor) {
return false;
}
const bIterator = b[Symbol.iterator]();
for (const aValue of a) {
const nextB = bIterator.next();
if (
nextB.done ||
!jasmine.matchersUtil.equals(
aValue,
nextB.value,
[iterableEquality]))
{
return false;
}
}
if (!bIterator.next().done) {
return false;
}
return true;
};
runtime.setMock(

@@ -166,3 +130,2 @@ '',

env.beforeEach(() => {
jasmine.addCustomEqualityTester(iterableEquality);
jasmine.addMatchers({

@@ -172,3 +135,2 @@ toMatchSnapshot: snapshot.matcher(

config,
jasmine,
snapshotState) });

@@ -179,33 +141,2 @@

jasmine.addMatchers({
toBeCalled: () => ({
compare: (actual, expected) => {
if (expected) {
throw Error(
'toBeCalled() does not accept parameters, use ' +
'toBeCalledWith instead.');
}
const isSpy = isSpyLike(actual);
if (!isSpy && !isMockLike(actual)) {
throw Error(
'toBeCalled() should be used on a mock function or ' +
'a jasmine spy.');
}
const calls = isSpy ?
actual.calls.all().map(x => x.args) :
actual.mock.calls;
const pass = calls.length !== 0;
const message =
pass ?
'Expected not to be called' :
'Expected to be called at least once';
return {
pass,
message };
} }),
lastCalledWith: util => ({

@@ -212,0 +143,0 @@ compare(actual) {

8

package.json
{
"name": "jest-jasmine2",
"version": "14.2.2-alpha.22bd3c33",
"version": "14.3.0-alpha.d13c163e",
"repository": {

@@ -13,5 +13,5 @@ "type": "git",

"jasmine-check": "^0.1.4",
"jest-matchers": "^14.2.2-alpha.22bd3c33",
"jest-snapshot": "^14.2.2-alpha.22bd3c33",
"jest-util": "^14.2.2-alpha.22bd3c33"
"jest-matchers": "^14.3.0-alpha.d13c163e",
"jest-snapshot": "^14.3.0-alpha.d13c163e",
"jest-util": "^14.3.0-alpha.d13c163e"
},

@@ -18,0 +18,0 @@ "scripts": {