mirror of
https://github.com/actions/runner-container-hooks.git
synced 2025-12-14 16:46:43 +00:00
15 lines
418 B
TypeScript
15 lines
418 B
TypeScript
import { containerPull } from '../src/dockerCommands'
|
|
|
|
jest.useRealTimers()
|
|
|
|
describe('container pull', () => {
|
|
it('should fail', async () => {
|
|
const arg = { image: 'does-not-exist' }
|
|
await expect(containerPull(arg.image, '')).rejects.toThrow()
|
|
})
|
|
it('should succeed', async () => {
|
|
const arg = { image: 'ubuntu:latest' }
|
|
await expect(containerPull(arg.image, '')).resolves.not.toThrow()
|
|
})
|
|
})
|