23 lines
415 B
TypeScript
23 lines
415 B
TypeScript
import { tap, expect } from '../../ts_tapbundle/index.js';
|
|
|
|
tap.test('should show string diff', async () => {
|
|
const expected = `line 1
|
|
line 2
|
|
line 3`;
|
|
|
|
const actual = `line 1
|
|
line changed
|
|
line 3`;
|
|
|
|
try {
|
|
expect(actual).toEqual(expected);
|
|
} catch (e) {
|
|
// Expected to fail
|
|
}
|
|
});
|
|
|
|
tap.test('should pass', async () => {
|
|
expect('hello').toEqual('hello');
|
|
});
|
|
|
|
tap.start({ throwOnError: false }); |