Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
timacdonald committed Jul 20, 2022
1 parent cb83149 commit 2d15680
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ describe('laravel-vite-plugin', () => {

const noSsrConfig = plugin.config({ build: { ssr: true } }, { command: 'build', mode: 'production' })
/* @ts-ignore */
expect(noSsrConfig.ssr.noExternal).toEqual(['laravel-vite-plugin/inertia-helpers'])
expect(noSsrConfig.ssr.noExternal).toEqual(['laravel-vite-plugin'])

/* @ts-ignore */
const nothingExternalConfig = plugin.config({ ssr: { noExternal: true }, build: { ssr: true } }, { command: 'build', mode: 'production' })
Expand All @@ -229,12 +229,12 @@ describe('laravel-vite-plugin', () => {
/* @ts-ignore */
const arrayNoExternalConfig = plugin.config({ ssr: { noExternal: ['foo'] }, build: { ssr: true } }, { command: 'build', mode: 'production' })
/* @ts-ignore */
expect(arrayNoExternalConfig.ssr.noExternal).toEqual(['foo', 'laravel-vite-plugin/inertia-helpers'])
expect(arrayNoExternalConfig.ssr.noExternal).toEqual(['foo', 'laravel-vite-plugin'])

/* @ts-ignore */
const stringNoExternalConfig = plugin.config({ ssr: { noExternal: 'foo' }, build: { ssr: true } }, { command: 'build', mode: 'production' })
/* @ts-ignore */
expect(stringNoExternalConfig.ssr.noExternal).toEqual(['foo', 'laravel-vite-plugin/inertia-helpers'])
expect(stringNoExternalConfig.ssr.noExternal).toEqual(['foo', 'laravel-vite-plugin'])
})

it('does not configure full reload when configuration it not an object', () => {
Expand Down

0 comments on commit 2d15680

Please sign in to comment.