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: { define: {
__VUE_OPTIONS_API__: true, __VUE_OPTIONS_API__: true,
__VUE_PROD_DEVTOOLS__: true, __VUE_PROD_DEVTOOLS__: true,
__VUE_PROD_HYDRATION_MISMATCH_DETAILS__: false,
}, },
}) })

View File

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

View File

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

View File

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