Skip to content

Commit

Permalink
test: fix build tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cossssmin committed Feb 16, 2023
1 parent 633f6a3 commit 1c27a7a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/test-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ const test = require('ava')
const execa = require('execa')

test('throws if not in project (build)', async t => {
const {stderr} = await execa.command('node bin/maizzle build')

t.truthy(stderr.includes('Error: Framework not found'))
await t.throwsAsync(async () => {
await execa.command('node bin/maizzle build')
}, {instanceOf: Error})
})

test('throws if not in project (serve)', async t => {
const {stderr} = await execa.command('node bin/maizzle serve')

t.truthy(stderr.includes('Error: Framework not found'))
await t.throwsAsync(async () => {
await execa.command('node bin/maizzle serve')
}, {instanceOf: Error})
})

0 comments on commit 1c27a7a

Please sign in to comment.