test: extract dynamic paths test from within other test! (#3860)

This commit is contained in:
Daniel Roe 2022-03-23 14:57:35 +00:00 committed by GitHub
parent a8317830a8
commit a0c4d6e7e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -180,8 +180,9 @@ describe('extends support', () => {
expect(html).toContain('Injected by extended middleware from bar') expect(html).toContain('Injected by extended middleware from bar')
}) })
}) })
})
describe('dynamic paths', () => { describe('dynamic paths', () => {
it('should work with no overrides', async () => { it('should work with no overrides', async () => {
const html = await $fetch('/assets') const html = await $fetch('/assets')
for (const match of html.matchAll(/(href|src)="(.*?)"/g)) { for (const match of html.matchAll(/(href|src)="(.*?)"/g)) {
@ -234,5 +235,4 @@ describe('extends support', () => {
expect(url.startsWith('https://example.com/_cdn/') || url === 'https://example.com/public.svg' || (process.env.TEST_WITH_WEBPACK && url === '/public.svg')).toBeTruthy() expect(url.startsWith('https://example.com/_cdn/') || url === 'https://example.com/public.svg' || (process.env.TEST_WITH_WEBPACK && url === '/public.svg')).toBeTruthy()
} }
}) })
})
}) })