test: re-enable testing js payloads (#27137)

This commit is contained in:
Daniel Roe 2024-05-09 21:47:31 +01:00 committed by GitHub
parent 65a2ec4592
commit 416d76ab80
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 1 deletions

View File

@ -199,8 +199,17 @@ jobs:
context: ["async", "default"] context: ["async", "default"]
manifest: ["manifest-on", "manifest-off"] manifest: ["manifest-on", "manifest-off"]
version: ["v4", "v3"] version: ["v4", "v3"]
payload: ["json", "js"]
node: [18] node: [18]
exclude: exclude:
- builder: "webpack"
payload: "js"
- manifest: "manifest-off"
payload: "js"
- context: "default"
payload: "js"
- os: windows-latest
payload: "js"
- env: "dev" - env: "dev"
builder: "webpack" builder: "webpack"
- manifest: "manifest-off" - manifest: "manifest-off"
@ -236,6 +245,7 @@ jobs:
TEST_MANIFEST: ${{ matrix.manifest }} TEST_MANIFEST: ${{ matrix.manifest }}
TEST_CONTEXT: ${{ matrix.context }} TEST_CONTEXT: ${{ matrix.context }}
TEST_V4: ${{ matrix.version == 'v4' }} TEST_V4: ${{ matrix.version == 'v4' }}
TEST_PAYLOAD: ${{ matrix.payload }}
SKIP_BUNDLE_SIZE: ${{ github.event_name != 'push' || matrix.env == 'dev' || matrix.builder == 'webpack' || matrix.context == 'default' || runner.os == 'Windows' }} SKIP_BUNDLE_SIZE: ${{ github.event_name != 'push' || matrix.env == 'dev' || matrix.builder == 'webpack' || matrix.context == 'default' || runner.os == 'Windows' }}
- uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be # v4.3.1 - uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be # v4.3.1

View File

@ -227,6 +227,7 @@ export default defineNuxtConfig({
treeshakeClientOnly: true, treeshakeClientOnly: true,
asyncContext: process.env.TEST_CONTEXT === 'async', asyncContext: process.env.TEST_CONTEXT === 'async',
appManifest: process.env.TEST_MANIFEST !== 'manifest-off', appManifest: process.env.TEST_MANIFEST !== 'manifest-off',
renderJsonPayloads: process.env.TEST_PAYLOAD !== 'js',
headNext: true, headNext: true,
inlineRouteRules: true, inlineRouteRules: true,
}, },

View File

@ -6,7 +6,7 @@ import { reactive, ref, shallowReactive, shallowRef } from 'vue'
import { createError } from 'h3' import { createError } from 'h3'
import { getBrowser, url, useTestContext } from '@nuxt/test-utils/e2e' import { getBrowser, url, useTestContext } from '@nuxt/test-utils/e2e'
export const isRenderingJson = true export const isRenderingJson = process.env.TEST_PAYLOAD !== 'js'
export async function renderPage (path = '/') { export async function renderPage (path = '/') {
const ctx = useTestContext() const ctx = useTestContext()