| 
1 | 1 | import { afterEach, describe, expect, it, vi } from 'vitest'  | 
2 | 2 | import laravel from '../src'  | 
3 |  | -import fs from 'fs'  | 
4 | 3 | 
 
  | 
5 | 4 | describe('laravel-vite-plugin', () => {  | 
6 | 5 |     afterEach(() => {  | 
@@ -169,30 +168,6 @@ describe('laravel-vite-plugin', () => {  | 
169 | 168 |         ])  | 
170 | 169 |     })  | 
171 | 170 | 
 
  | 
172 |  | -    it('provides an ziggy alias when installed', () => {  | 
173 |  | -        vi.spyOn(fs, 'existsSync').mockReturnValueOnce(true)  | 
174 |  | - | 
175 |  | -        const plugin = laravel('resources/js/app.js')  | 
176 |  | - | 
177 |  | -        const config = plugin.config({}, { command: 'build', mode: 'development' })  | 
178 |  | - | 
179 |  | -        expect(config.resolve.alias['ziggy']).toBe('vendor/tightenco/ziggy/dist/index.es.js')  | 
180 |  | -    })  | 
181 |  | - | 
182 |  | -    it('provides an ziggy alias when installed and using an alias array', () => {  | 
183 |  | -        vi.spyOn(fs, 'existsSync').mockReturnValueOnce(true)  | 
184 |  | - | 
185 |  | -        const plugin = laravel('resources/js/app.js')  | 
186 |  | - | 
187 |  | -        const config = plugin.config({  | 
188 |  | -            resolve: {  | 
189 |  | -                alias: [],  | 
190 |  | -            }  | 
191 |  | -        }, { command: 'build', mode: 'development' })  | 
192 |  | - | 
193 |  | -        expect(config.resolve.alias).toContainEqual({ find: 'ziggy', replacement: 'vendor/tightenco/ziggy/dist/index.es.js' })  | 
194 |  | -    })  | 
195 |  | - | 
196 | 171 |     it('configures the Vite server when inside a Sail container', () => {  | 
197 | 172 |         process.env.LARAVEL_SAIL = '1'  | 
198 | 173 |         const plugin = laravel('resources/js/app.js')  | 
 | 
0 commit comments