chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 12:47:58 +08:00
commit b16403ea71
789 changed files with 115226 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
import { expect } from 'vitest'
import { sandboxTest, isDebug } from '../setup.js'
import { Sandbox } from '../../src'
sandboxTest.skipIf(isDebug)(
'kill existing sandbox',
async ({ sandbox, sandboxTestId }) => {
await Sandbox.kill(sandbox.sandboxId)
const paginator = Sandbox.list({
query: { state: ['running'], metadata: { sandboxTestId } },
})
const sandboxes = await paginator.nextItems()
expect(sandboxes.map((s) => s.sandboxId)).not.toContain(sandbox.sandboxId)
}
)
sandboxTest.skipIf(isDebug)('kill non-existing sandbox', async () => {
await expect(Sandbox.kill('nonexistingsandbox')).resolves.toBe(false)
})