Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

test: enable test for bridge with vite #1285

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"lint": "eslint --ext .vue,.ts,.js .",
"test": "yarn lint && yarn test:presets",
"test:presets": "mocha test/presets/*.mjs",
"test:bridge": "TEST_BRIDGE=1 yarn test:presets",
"test:bridge": "TEST_BRIDGE=1 yarn test:presets && TEST_BRIDGE=1 TEST_BRIDGE_VITE=1 yarn test:presets",
"test:unit": "mocha -r jiti/register packages/**/test/*.test.*",
"version": "yarn && git add yarn.lock"
},
Expand Down
7 changes: 6 additions & 1 deletion packages/bridge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,20 @@
"scule": "^0.2.1",
"ufo": "^0.7.9",
"unplugin": "^0.2.16",
"unplugin-vue2-script-setup": "0.6.11"
"unplugin-vue2-script-setup": "0.6.11",
"vue-template-compiler": "^2.6.14"
},
"devDependencies": {
"@types/fs-extra": "^9.0.13",
"@types/node-fetch": "^3.0.2",
"unbuild": "latest",
"vue": "^2",
"vue-router": "3"
},
"engines": {
"node": "^14.16.0 || ^16.11.0"
},
"installConfig": {
"hoistingLimits": "workspaces"
}
}
7 changes: 5 additions & 2 deletions test/fixtures/bridge/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ export default defineNuxtConfig({
output: { dir: process.env.NITRO_OUTPUT_DIR }
},
bridge: {
meta: true
}
meta: true,
vite: !!process.env.TEST_BRIDGE_VITE
},
// @ts-expect-error
vite: process.env.TEST_BRIDGE_VITE ? { build: true } : undefined
})
1 change: 1 addition & 0 deletions test/fixtures/bridge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"build": "nuxt build"
},
"devDependencies": {
"@nuxt/bridge": "*",
"core-js": "^3",
"nuxt": "^2",
"vue": "^2"
Expand Down
5 changes: 4 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2383,7 +2383,7 @@ __metadata:
languageName: node
linkType: hard

"@nuxt/bridge@workspace:packages/bridge":
"@nuxt/bridge@*, @nuxt/bridge@workspace:packages/bridge":
version: 0.0.0-use.local
resolution: "@nuxt/bridge@workspace:packages/bridge"
dependencies:
Expand Down Expand Up @@ -2412,7 +2412,9 @@ __metadata:
unbuild: latest
unplugin: ^0.2.16
unplugin-vue2-script-setup: 0.6.11
vue: ^2
vue-router: 3
vue-template-compiler: ^2.6.14
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -9685,6 +9687,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "fixture-basic@workspace:test/fixtures/bridge"
dependencies:
"@nuxt/bridge": "*"
core-js: ^3
nuxt: ^2
vue: ^2
Expand Down