Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions advanced/api/test-specification.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
```ts
const specification = project.createSpecification(
resolve('./example.test.ts'),
[20, 40], // optional test lines
[20, 40], // 可选测试行
)
```

`createSpecification` 期望一个已解析的模块 ID。它不会自动解析文件或检查文件是否存在于文件系统中。

## taskId

[Test module's](/advanced/api/test-suite#id) identifier.
[测试模块的](/advanced/api/test-suite#id) 标识符。

## project

Expand All @@ -33,7 +33,7 @@ Vite 模块图中的模块 ID。通常,它是一个使用 POSIX 分隔符的

## testModule

Instance of [`TestModule`](/advanced/api/test-module) associated with the specification. If test wasn't queued yet, this will be `undefined`.
与规范相关联的 [`TestModule`](/advanced/api/test-module) 实例。如果测试还未加入队列,则将是 `undefined`

## pool <Badge type="warning">experimental</Badge> {#pool}

Expand Down