File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -94,12 +94,15 @@ describe('laravel-vite-plugin', () => {
9494 expect ( ssrConfig . build . rollupOptions . input ) . toBe ( 'resources/js/ssr.js' )
9595 } )
9696
97- it ( 'prefixes the base with ASSET_URL' , ( ) => {
97+ it ( 'prefixes the base with ASSET_URL in production mode ' , ( ) => {
9898 process . env . ASSET_URL = 'http://example.com'
9999 const plugin = laravel ( 'resources/js/app.js' )
100100
101- const config = plugin . config ( { } , { command : 'build' , mode : 'production' } )
102- expect ( config . base ) . toBe ( 'http://example.com/build/' )
101+ const devConfig = plugin . config ( { } , { command : 'serve' , mode : 'development' } )
102+ expect ( devConfig . base ) . toBe ( '' )
103+
104+ const prodConfig = plugin . config ( { } , { command : 'build' , mode : 'production' } )
105+ expect ( prodConfig . base ) . toBe ( 'http://example.com/build/' )
103106
104107 delete process . env . ASSET_URL
105108 } )
You can’t perform that action at this time.
0 commit comments