fix(core): update
This commit is contained in:
parent
56fb434f7d
commit
9213e7905f
@ -36,4 +36,12 @@ tap.test('should be greater than', async () => {
|
||||
smartexpect.expect(4).toBeLessThan(5);
|
||||
})
|
||||
|
||||
tap.test('should correctly determine toContain', async () => {
|
||||
const hello = {
|
||||
socool: 'yes'
|
||||
};
|
||||
const testArray = [hello];
|
||||
smartexpect.expect(testArray).toContain(hello);
|
||||
})
|
||||
|
||||
tap.start();
|
||||
|
@ -189,9 +189,7 @@ export class Assertion {
|
||||
return this.runCheck(() => {
|
||||
const result =
|
||||
this.baseReference instanceof Array &&
|
||||
this.baseReference.find((itemArg2) => {
|
||||
itemArg === itemArg2;
|
||||
});
|
||||
this.baseReference.includes(itemArg);
|
||||
if (!result) {
|
||||
throw new Error(`${this.baseReference} is not contain ${itemArg}`);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user