Skip to content

Commit

Permalink
fix: 9919 add check for successfull compilation and fix warnin check
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrika committed Jan 25, 2020
1 parent f6cdb7b commit 5595d64
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/integration/config-empty/test/index.test.js
Expand Up @@ -6,12 +6,15 @@ import { nextBuild } from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5

describe('Empty configuration', () => {
it('should show relevant warning when configuration is not found', async () => {
const { stdout } = await nextBuild(join(__dirname, '..'), [], {
it('should show relevant warning and compile successfully', async () => {
const { stderr, stdout } = await nextBuild(join(__dirname, '..'), [], {
stderr: true,
stdout: true,
})
expect(stdout).not.toMatch(

expect(stderr).toMatch(
/Warning: Detected next.config.js, no exported configuration found./
)
expect(stdout).toMatch(/Compiled successfully./)
})
})

0 comments on commit 5595d64

Please sign in to comment.