Skip to content

Commit

Permalink
unsupported pkg manager test
Browse files Browse the repository at this point in the history
  • Loading branch information
musdotdigital committed Dec 1, 2023
1 parent 02a21e6 commit e4eabb4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions __tests__/data/Dockerfile.unsupported
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM busybox:latest
7 changes: 7 additions & 0 deletions __tests__/dockerfile.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,10 @@ test('load alpine dockerfile', async () => {
const dockerfile = await load(dockerfilePath)
expect(dockerfile.name).toBe('alpine:latest')
})

test('load dockerfile with unsupported package manager', async () => {
const dockerfilePath = path.join(__dirname, 'data', 'Dockerfile.unsupported')
await expect(load(dockerfilePath)).rejects.toThrow(
'Unable to find supported package manager'
)
}, 10000)

0 comments on commit e4eabb4

Please sign in to comment.