test: misc fixes (#18200)

This commit is contained in:
翠 / green 2024-09-26 16:54:49 +09:00 committed by GitHub
parent 6f030ec15f
commit 1166a90728
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 4 additions and 11 deletions

View File

@ -39,5 +39,6 @@ export default defineConfig({
define: {
__VUE_OPTIONS_API__: true,
__VUE_PROD_DEVTOOLS__: true,
__VUE_PROD_HYDRATION_MISMATCH_DETAILS__: false,
},
})

View File

@ -1,10 +1,10 @@
import { describe, expect, test } from 'vitest'
import { port } from './serve'
import { getColor, page } from '~utils'
import { getColor, isServe, page } from '~utils'
const url = `http://localhost:${port}`
describe('injected inline style', () => {
describe.runIf(isServe)('injected inline style', () => {
test('injected inline style is present', async () => {
await page.goto(url)
const el = await page.$('.ssr-proxy')

View File

@ -15,7 +15,6 @@
image
</p>
<p>Imported css string:</p>
<pre class="imported-css"></pre>
<pre class="imported-css-glob"></pre>
<pre class="imported-css-globEager"></pre>
@ -37,7 +36,6 @@
url starts with function call
</p>
<p>Imported SASS string:</p>
<pre class="imported-sass"></pre>
<p class="sass-dep">
@import dependency w/ no scss entrypoint: this should be lavender
</p>
@ -55,8 +53,6 @@
contains alias
</p>
<p class="less-url-starts-with-variable">url starts with variable</p>
<p>Imported Less string:</p>
<pre class="imported-less"></pre>
<div class="form-box-data-uri">
tests Less's `data-uri()` function with relative image paths
@ -87,8 +83,6 @@
Stylus define function via vite config preprocessor options: This should be
rgb(255, 0, 98)
</p>
<p>Imported Stylus string:</p>
<pre class="imported-stylus"></pre>
<p class="sugarss">SugarSS: This should be blue</p>
<p class="sugarss-at-import">
@ -98,8 +92,6 @@
@import from SugarSS: This should be darkslateblue and have bg image which
url contains alias
</p>
<p>Imported SugarSS string:</p>
<pre class="imported-sugarss"></pre>
<p class="modules">CSS modules: this should be turquoise</p>
<p>Imported CSS module:</p>

View File

@ -270,7 +270,7 @@ export async function startDefaultServe(): Promise<void> {
},
)
if (buildConfig.builder) {
const builder = await createBuilder({ root: rootDir })
const builder = await createBuilder(buildConfig)
await builder.buildApp()
} else {
const rollupOutput = await build(buildConfig)