Skip to content
Merged
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
3 changes: 3 additions & 0 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,9 @@ export default defineNuxtConfig({
noUnusedLocals: true,
},
},
sharedTsConfig: {
include: ['../test/unit/shared/**/*.ts'],
},
nodeTsConfig: {
compilerOptions: {
allowImportingTsExtensions: true,
Expand Down
5 changes: 3 additions & 2 deletions test/unit/shared/types/index.spec.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { describe, expect, it } from 'vitest'
import type { NpmPackage, NpmSearchResponse } from '../../../../shared/types'
import type { Packument, NpmSearchResponse } from '../../../../shared/types'

describe('npm registry types', () => {
it('should correctly type a package response', () => {
const pkg: NpmPackage = {
const pkg: Packument = {
'_id': 'test-package',
'_rev': '1-abc123',
'name': 'test-package',
Expand Down Expand Up @@ -59,6 +59,7 @@ describe('npm registry types', () => {
],
total: 1,
time: '2024-01-01T00:00:00.000Z',
isStale: false,
}

expect(response.total).toBe(1)
Expand Down
Loading