This repository was archived by the owner on Apr 6, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 984
feat(nuxi)!: setup nuxt globally with nuxt test
#4578
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
80a1121
feat: nuxi test supports setting up apps globally
antfu 2fd0dcc
chore: expose types
antfu fac79fc
chore: lock
antfu 8b59d2f
Merge branch 'main' into feat/nuxt-test-global
antfu 6302185
chore: update
antfu c3b37e8
Merge branch 'main' into feat/nuxt-test-global
antfu 31ef9c3
Merge branch 'main' into feat/nuxt-test-global
antfu bafa116
Merge branch 'main' into feat/nuxt-test-global
antfu fb2047c
fix: only keep neccessary keys
antfu 1c209aa
Merge branch 'main' into feat/nuxt-test-global
antfu 8674417
chore: update lock
antfu 28ec657
Merge branch 'main' into feat/nuxt-test-global
antfu e51c6e2
chore: update
antfu 67d6c2a
chore: update
antfu 43ba827
Merge branch 'main' into feat/nuxt-test-global
pi0 7ec5bc9
update lock
pi0 da0b0aa
small updates
pi0 71957ac
add json parse format
pi0 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| import { fileURLToPath } from 'node:url' | ||
| import { dirname, resolve } from 'pathe' | ||
|
|
||
| export const distDir = dirname(fileURLToPath(import.meta.url)) | ||
| export const pkgDir = resolve(distDir, '..') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| import { createTest, exposeContextToEnv } from '@nuxt/test-utils' | ||
|
|
||
| const hooks = createTest(JSON.parse(process.env.NUXT_TEST_OPTIONS || '{}')) | ||
|
|
||
| export const setup = async () => { | ||
| await hooks.setup() | ||
| exposeContextToEnv() | ||
| } | ||
|
|
||
| export const teardown = async () => { | ||
| await hooks.afterAll() | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.