Skip to content

Commit

Permalink
test: fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien-R44 committed Jun 2, 2024
1 parent ab0a13b commit 32b4a93
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions tests/backend/vite.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

import { join } from 'node:path'
import { test } from '@japa/runner'
import { fileURLToPath } from 'node:url'

import { Vite } from '../../src/vite.js'
import { defineConfig } from '../../src/define_config.js'
Expand Down Expand Up @@ -236,7 +237,7 @@ test.group('Vite | manifest', () => {
children: [],
},
])
assert.deepEqual(
assert.containsSubset(
output.map((element) => String(element)),
['<script type="module" src="/assets/test-12345.js"></script>']
)
Expand Down Expand Up @@ -271,7 +272,7 @@ test.group('Vite | manifest', () => {
children: [],
},
])
assert.deepEqual(
assert.containsSubset(
output.map((element) => String(element)),
[
'<link rel="stylesheet" href="/assets/main.b82dbe22.css"/>',
Expand Down Expand Up @@ -303,7 +304,7 @@ test.group('Vite | manifest', () => {
children: [],
},
])
assert.deepEqual(
assert.containsSubset(
output.map((element) => String(element)),
['<script type="module" src="https://cdn.url.com/test-12345.js"></script>']
)
Expand Down Expand Up @@ -423,7 +424,7 @@ test.group('Vite | manifest', () => {
children: [],
},
])
assert.deepEqual(
assert.containsSubset(
output.map((element) => String(element)),
['<script type="module" data-test="test" src="https://cdn.url.com/test-12345.js"></script>']
)
Expand Down Expand Up @@ -458,7 +459,7 @@ test.group('Vite | manifest', () => {
},
},
])
assert.deepEqual(
assert.containsSubset(
output.map((element) => String(element)),
['<link rel="stylesheet" data-test="test" href="https://cdn.url.com/app-12345.css"/>']
)
Expand Down Expand Up @@ -505,7 +506,7 @@ test.group('Vite | manifest', () => {
children: [],
},
])
assert.deepEqual(
assert.containsSubset(
output.map((element) => String(element)),
[
'<link rel="stylesheet" href="https://cdn.url.com/app-12345.css"/>',
Expand All @@ -528,7 +529,7 @@ test.group('Vite | manifest', () => {

test.group('Preloading', () => {
const config = defineConfig({
manifestFile: join(import.meta.dirname, 'fixtures/adonis_packages_manifest.json'),
manifestFile: fileURLToPath(new URL('fixtures/adonis_packages_manifest.json', import.meta.url)),
})

test('Preload root entrypoints', async ({ assert }) => {
Expand Down

0 comments on commit 32b4a93

Please sign in to comment.