mirror of
https://github.com/actions/runner-container-hooks.git
synced 2025-12-15 01:06:43 +00:00
Initial Commit
This commit is contained in:
14
packages/docker/tests/container-pull-test.ts
Normal file
14
packages/docker/tests/container-pull-test.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { containerPull } from '../src/dockerCommands'
|
||||
|
||||
jest.useRealTimers()
|
||||
|
||||
describe('container pull', () => {
|
||||
it('should fail', async () => {
|
||||
const arg = { image: 'doesNotExist' }
|
||||
await expect(containerPull(arg.image, '')).rejects.toThrow()
|
||||
})
|
||||
it('should succeed', async () => {
|
||||
const arg = { image: 'ubuntu:latest' }
|
||||
await expect(containerPull(arg.image, '')).resolves.not.toThrow()
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user