Files
runner-container-hooks/packages/docker/tests/container-pull-test.ts
T

15 lines
418 B
TypeScript
Raw Normal View History

2022-06-02 15:53:11 -04:00
import { containerPull } from '../src/dockerCommands'
jest.useRealTimers()
describe('container pull', () => {
it('should fail', async () => {
2022-06-03 06:56:26 -07:00
const arg = { image: 'does-not-exist' }
2022-06-02 15:53:11 -04:00
await expect(containerPull(arg.image, '')).rejects.toThrow()
})
it('should succeed', async () => {
const arg = { image: 'ubuntu:latest' }
await expect(containerPull(arg.image, '')).resolves.not.toThrow()
})
})