[READ-ONLY] a fast, modern browser for the npm registry
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

test: enable type-checking of shared tests (#743)

authored by

James Garbutt and committed by
GitHub
84714f56 ce04e814

+6 -2
+3
nuxt.config.ts
··· 248 248 noUnusedLocals: true, 249 249 }, 250 250 }, 251 + sharedTsConfig: { 252 + include: ['../test/unit/shared/**/*.ts'], 253 + }, 251 254 nodeTsConfig: { 252 255 compilerOptions: { 253 256 allowImportingTsExtensions: true,
+3 -2
test/unit/shared/types/index.spec.ts
··· 1 1 import { describe, expect, it } from 'vitest' 2 - import type { NpmPackage, NpmSearchResponse } from '../../../../shared/types' 2 + import type { Packument, NpmSearchResponse } from '../../../../shared/types' 3 3 4 4 describe('npm registry types', () => { 5 5 it('should correctly type a package response', () => { 6 - const pkg: NpmPackage = { 6 + const pkg: Packument = { 7 7 '_id': 'test-package', 8 8 '_rev': '1-abc123', 9 9 'name': 'test-package', ··· 59 59 ], 60 60 total: 1, 61 61 time: '2024-01-01T00:00:00.000Z', 62 + isStale: false, 62 63 } 63 64 64 65 expect(response.total).toBe(1)