diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/with-vitest/test/basic.test.ts | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/examples/with-vitest/test/basic.test.ts b/examples/with-vitest/test/basic.test.ts index 0f6d96168..f4677c6cb 100644 --- a/examples/with-vitest/test/basic.test.ts +++ b/examples/with-vitest/test/basic.test.ts @@ -1,21 +1,21 @@ -import { assert, expect, test } from 'vitest' +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) -}) + 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 input = { + foo: 'hello', + bar: 'world', + }; - const output = JSON.stringify(input) + const output = JSON.stringify(input); - expect(output).eq('{"foo":"hello","bar":"world"}') - assert.deepEqual(JSON.parse(output), input, 'matches original') -}) + expect(output).eq('{"foo":"hello","bar":"world"}'); + assert.deepEqual(JSON.parse(output), input, 'matches original'); +}); |