Skip to content

Releases: ssssota/doc-vitest

[email protected]

29 Oct 14:45
1eeb18f
Compare
Choose a tag to compare

Patch Changes

[email protected]

28 Oct 16:23
434b943
Compare
Choose a tag to compare

Minor Changes

[email protected]

27 Apr 14:52
5016aab
Compare
Choose a tag to compare

Major Changes

MIGRATION GUIDE

TypeScript/JavaScript

You should use the @example tag to specify the test code, and put the @import.meta.vitest marker after the language specifier.
This is a more natural way to specify the example code.

V0
/**
 * @import.meta.vitest
 * ```ts
 * expect(add(1, 2)).toBe(3);
 * ```
 */
const add = (a: number, b: number) => a + b;

V1

/**
 * @example
 * ```ts @import.meta.vitest
 * expect(add(1, 2)).toBe(3);
 * ```
 */
const add = (a: number, b: number) => a + b;
Markdown

You should put the @import.meta.vitest marker after the language specifier.

V0
<!-- @import.meta.vitest -->
```ts
const { add } = await import('./add');
expect(add(1, 2)).toBe(3);
```

V1

```ts @import.meta.vitest
const { add } = await import('./add');
expect(add(1, 2)).toBe(3);
```

[email protected]

07 Mar 07:13
31d9901
Compare
Choose a tag to compare

Patch Changes

[email protected]

05 Dec 15:05
d236d2f
Compare
Choose a tag to compare

Patch Changes

[email protected]

14 Sep 10:50
ad0f0c0
Compare
Choose a tag to compare

Patch Changes