Skip to content

Commit

Permalink
Enable extra test in dev
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk committed Oct 19, 2020
1 parent 0f3873d commit 38715f1
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions test/integration/image-optimizer/test/index.test.js
Expand Up @@ -131,16 +131,14 @@ function runTests({ w, isDev, domains }) {
)
})

if (!isDev) {
it('should fail when domain is not defined in next.config.js', async () => {
const url = `http://vercel.com/button`
const query = { url, w, q: 100 }
const opts = { headers: { accept: 'image/webp' } }
const res = await fetchViaHTTP(appPort, '/_next/image', query, opts)
expect(res.status).toBe(400)
expect(await res.text()).toBe(`"url" parameter is not allowed`)
})
}
it('should fail when domain is not defined in next.config.js', async () => {
const url = `http://vercel.com/button`
const query = { url, w, q: 100 }
const opts = { headers: { accept: 'image/webp' } }
const res = await fetchViaHTTP(appPort, '/_next/image', query, opts)
expect(res.status).toBe(400)
expect(await res.text()).toBe(`"url" parameter is not allowed`)
})

it('should fail when width is not in next.config.js', async () => {
const query = { url: '/test.png', w: 1000, q: 100 }
Expand Down

0 comments on commit 38715f1

Please sign in to comment.