Skip to content

Commit 9f73b4a

Browse files
committed
test: add 5ms extra timeout in github CI
1 parent 0cf53d1 commit 9f73b4a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

packages/mdc-syntax/test/index.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ function parseTimeout(timeoutStr: string): number {
2828

2929
const value = Number.parseInt(match[1], 10)
3030
const unit = match[2]
31-
return unit === 's' ? value * 1000 : value
31+
const ms = unit === 's' ? value * 1000 : value
32+
return ms + (process.env.GITHUB_ACTIONS ? 5 : 0) /* add 5ms to avoid random Github Actions failures */
3233
}
3334

3435
function extractFrontmatter(content: string): { timeouts?: TestCase['timeouts'], body: string, options?: TestCase['options'] } {

0 commit comments

Comments
 (0)