Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions tests/integration/simple-app.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,21 +149,21 @@ test<FixtureTestContext>('Test that the simple next app is working', async (ctx)
describe('verification', () => {
test<FixtureTestContext>("Should warn if publish dir doesn't exist", async (ctx) => {
await createFixture('simple', ctx)
expect(() => runPlugin(ctx, { PUBLISH_DIR: 'no-such-directory' })).rejects.toThrowError(
await expect(() => runPlugin(ctx, { PUBLISH_DIR: 'no-such-directory' })).rejects.toThrowError(
/Your publish directory was not found at: \S+no-such-directory. Please check your build settings/,
)
})

test<FixtureTestContext>('Should warn if publish dir is root', async (ctx) => {
await createFixture('simple', ctx)
expect(() => runPlugin(ctx, { PUBLISH_DIR: '.' })).rejects.toThrowError(
await expect(() => runPlugin(ctx, { PUBLISH_DIR: '.' })).rejects.toThrowError(
'Your publish directory cannot be the same as the base directory of your site. Please check your build settings',
)
})

test<FixtureTestContext>('Should warn if publish dir is root (package path variant)', async (ctx) => {
await createFixture('simple', ctx)
expect(() =>
await expect(() =>
runPlugin(ctx, { PUBLISH_DIR: 'app/.', PACKAGE_PATH: 'app' }),
).rejects.toThrowError(
'Your publish directory cannot be the same as the base directory of your site. Please check your build settings',
Expand All @@ -172,7 +172,7 @@ describe('verification', () => {

test<FixtureTestContext>('Should warn if publish dir is not set to Next.js output directory', async (ctx) => {
await createFixture('simple', ctx)
expect(() => runPlugin(ctx, { PUBLISH_DIR: 'public' })).rejects.toThrowError(
await expect(() => runPlugin(ctx, { PUBLISH_DIR: 'public' })).rejects.toThrowError(
'Your publish directory does not contain expected Next.js build output. Please check your build settings',
)
})
Expand Down
Loading