feat: Add support for cypress and vitest

Signed-off-by: Avior <github@avior.me>
This commit is contained in:
2023-06-21 20:01:17 +02:00
parent dc80dec6a8
commit 8442c7b4e3
10 changed files with 2478 additions and 9 deletions

21
tests/basic.test.ts Normal file
View File

@ -0,0 +1,21 @@
import { assert, expect, test } from 'vitest'
// Edit an assertion and save to see HMR in action
test('Math.sqrt()', () => {
expect(Math.sqrt(4)).toBe(2);
expect(Math.sqrt(144)).toBe(12);
expect(Math.sqrt(2)).toBe(Math.SQRT2);
});
test('JSON', () => {
const input = {
foo: 'hello',
bar: 'world',
};
const output = JSON.stringify(input);
expect(output).eq('{"foo":"hello","bar":"world"}');
assert.deepEqual(JSON.parse(output), input, 'matches original');
});