Skip to content

Commit 809c89f

Browse files
committed
test: accept nuxt/app specifier for NuxtError in snapshot
1 parent 280ac8d commit 809c89f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

test/build.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ describe('module builder', () => {
164164
const expectedErrorType = satisfies(nuxtVersion, '^3') ? 'null' : 'undefined'
165165
const errorType = satisfies(nuxtVersion, '^3')
166166
? 'import\\("ofetch"\\)\\.FetchError<any>'
167-
: '(?:import\\("ofetch"\\)\\.FetchError<any>|import\\("#app"\\)\\.NuxtError<unknown>)'
167+
: '(?:import\\("ofetch"\\)\\.FetchError<any>|import\\("(?:nuxt/app|#app)"\\)\\.NuxtError<unknown>)'
168168
expect(componentFile).toMatch(
169169
new RegExp(
170170
`^export declare const useWrappedFetch: \\(\\) => import\\("(?:nuxt/app|#app)"\\)\\.AsyncData<unknown, ${errorType} \\| ${expectedErrorType}>;\\s*$`,

0 commit comments

Comments
 (0)