BREAKING CHANGE(core): switxh to @pushrocks/smartexpect

This commit is contained in:
2022-01-21 19:54:07 +01:00
parent 22df58b8bc
commit 0884da7941
6 changed files with 85 additions and 34 deletions

View File

@ -5,7 +5,7 @@ tap.preTask('hi there', async () => {
});
const test1 = tap.test('my first test -> expect true to be true', async () => {
return expect(true).to.be.true;
return expect(true).toBeTrue();
});
const test2 = tap.test('my second test', async (tools) => {
@ -18,14 +18,14 @@ const test3 = tap.test(
expect(
(await test1.testPromise).hrtMeasurement.milliSeconds <
(await test2).hrtMeasurement.milliSeconds
).to.be.true;
expect((await test2.testPromise).hrtMeasurement.milliSeconds > 1000).to.be.true;
).toBeTrue();
expect((await test2.testPromise).hrtMeasurement.milliSeconds > 1000).toBeTrue();
}
);
const test4 = tap.test('my 4th test -> should fail', async (tools) => {
tools.allowFailure();
expect(false).to.be.false;
expect(false).toBeFalse();
return 'hello';
});