chore: import upstream snapshot with attribution
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
import { expect } from 'vitest'
|
||||
|
||||
import { sandboxTest, isDebug, wait } from '../setup.js'
|
||||
|
||||
sandboxTest.skipIf(isDebug)('shorten timeout', async ({ sandbox }) => {
|
||||
await sandbox.setTimeout(5000)
|
||||
|
||||
await wait(6000)
|
||||
|
||||
expect(await sandbox.isRunning()).toBeFalsy()
|
||||
})
|
||||
|
||||
sandboxTest.skipIf(isDebug)(
|
||||
'shorten then lengthen timeout',
|
||||
async ({ sandbox }) => {
|
||||
await sandbox.setTimeout(5000)
|
||||
|
||||
await wait(1000)
|
||||
|
||||
await sandbox.setTimeout(10000)
|
||||
|
||||
await wait(6000)
|
||||
|
||||
expect(await sandbox.isRunning()).toBeTruthy()
|
||||
}
|
||||
)
|
||||
|
||||
sandboxTest.skipIf(isDebug)('get sandbox timeout', async ({ sandbox }) => {
|
||||
const { endAt } = await sandbox.getInfo()
|
||||
expect(endAt).toBeInstanceOf(Date)
|
||||
})
|
||||
Reference in New Issue
Block a user