Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit a91943b

Browse files
committed
test
1 parent 7c4f1aa commit a91943b

2 files changed

Lines changed: 5 additions & 14 deletions

File tree

lib/mocha/jasmine-bridge/jasmine.expect.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,10 @@ function getMatchers() {
135135
}
136136
} catch (error) {
137137
pass = !expected || eq(error, expected);
138+
if (!pass) {
139+
console.log('expected', expected instanceof Error, expected.message, expected.description);
140+
console.log('error', error instanceof Error, error.message, error.description);
141+
}
138142
}
139143
return {pass};
140144
}

lib/mocha/jest-bridge/jest.expect.ts

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -111,20 +111,7 @@ export function expandExpect(global: any) {
111111
});
112112

113113
expect.extend = function(extendedMatchers: any) {
114-
const jasmineMatchers: any = {};
115-
Object.keys(extendedMatchers).forEach(key => {
116-
if (extendedMatchers.hasOwnProperty(key)) {
117-
const matcher = extendedMatchers[key];
118-
jasmineMatchers[key] = function(util: any, customEqualityTester: any) {
119-
return {
120-
compare: function(actual: any, expected: any) {
121-
return matcher(actual, expected);
122-
}
123-
};
124-
};
125-
}
126-
});
127-
jasmine.addMatchers(jasmineMatchers);
114+
return jasmine.addMatchers(extendedMatchers);
128115
};
129116

130117
jasmine.addMatchers({

0 commit comments

Comments
 (0)