Skip to content

Commit

Permalink
Merge branch 'nuxt:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Ibochkarev authored Jun 11, 2024
2 parents 7bc9479 + 115fc2d commit 14f23b9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/fixtures/basic-types/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import type { FetchError } from 'ofetch'
import type { NavigationFailure, RouteLocationNormalized, RouteLocationRaw, Router, useRouter as vueUseRouter } from '#vue-router'

import type { AppConfig, RuntimeValue, UpperSnakeCase } from 'nuxt/schema'
import { defineNuxtModule } from 'nuxt/kit'
import { defineNuxtConfig } from 'nuxt/config'
import { callWithNuxt, isVue3 } from '#app'
import type { NuxtError } from '#app'
Expand Down Expand Up @@ -242,6 +243,17 @@ describe('modules', () => {
// @ts-expect-error we want to ensure we throw type error on invalid key
defineNuxtConfig({ undeclaredKey: { other: false } })
})

it('preserves options in defineNuxtModule setup without `.with()`', () => {
defineNuxtModule<{ foo?: string, baz: number }>({
defaults: {
baz: 100,
},
setup: (resolvedOptions) => {
expectTypeOf(resolvedOptions).toEqualTypeOf<{ foo?: string, baz: number }>()
},
})
})
})

describe('nuxtApp', () => {
Expand Down

0 comments on commit 14f23b9

Please sign in to comment.