mirror of
https://github.com/hanzoai/vite.git
synced 2026-10-30 19:36:16 +00:00
+3








bcd936335c
Co-authored-by: Hiroshi Ogawa <[email protected]> Co-authored-by: Dario Piotrowicz <[email protected]> Co-authored-by: Vladimir Sheremet <[email protected]> Co-authored-by: Arnaud Barré <[email protected]> Co-authored-by: Anthony Fu <[email protected]> Co-authored-by: Dominik G <[email protected]> Co-authored-by: Igor Minar <[email protected]> Co-authored-by: Viktor Lázár <[email protected]> Co-authored-by: Joaquín Sánchez <[email protected]> Co-authored-by: sapphi-red <[email protected]> Co-authored-by: bluwy <[email protected]>
13 lines
526 B
TypeScript
13 lines
526 B
TypeScript
import { expect, test } from 'vitest'
|
|
import { isServe, page, viteServer } from '~utils'
|
|
|
|
test.runIf(isServe)('importedUrls order is preserved', async () => {
|
|
const el = page.locator('.imported-urls-order')
|
|
expect(await el.textContent()).toBe('[success]')
|
|
const mod = await viteServer.environments.client.moduleGraph.getModuleByUrl(
|
|
'/imported-urls-order.js',
|
|
)
|
|
const importedModuleIds = [...mod.importedModules].map((m) => m.url)
|
|
expect(importedModuleIds).toEqual(['\x00virtual:slow-module', '/empty.js'])
|
|
})
|