From b40c460284ee3549dbbe46afa60f79aa61d183ff Mon Sep 17 00:00:00 2001 From: Lars Kappert Date: Thu, 6 Oct 2022 16:58:08 +0200 Subject: [PATCH] Update specs --- test/fixtures/basic/dep.ts | 2 ++ test/index.spec.ts | 18 ++++++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/test/fixtures/basic/dep.ts b/test/fixtures/basic/dep.ts index 223ef69e7..5b57a862f 100644 --- a/test/fixtures/basic/dep.ts +++ b/test/fixtures/basic/dep.ts @@ -3,6 +3,8 @@ import * as ns from './ns'; const x = ns.x; const y = ns.y; +export const unused = 1; + export const dep = y(x); export type Dep = any; diff --git a/test/index.spec.ts b/test/index.spec.ts index 34d525e85..a130ee446 100644 --- a/test/index.spec.ts +++ b/test/index.spec.ts @@ -10,25 +10,31 @@ test('run', async () => { isOnlyFiles: false, isOnlyExports: false, isOnlyTypes: false, + isOnlyNsMembers: false, isOnlyDuplicates: false, isFindUnusedFiles: true, isFindUnusedExports: true, isFindUnusedTypes: true, isFindDuplicateExports: true, - isFollowSymbols: false, - isShowProgress: false + isFindNsImports: true, + isShowProgress: false, + jsDocOptions: { + isReadPublicTag: false, + }, }); assert(issues.file.size === 1); - assert(Array.from(issues.file)[0].endsWith('dangling.ts')); assert(Object.values(issues.export).length === 1); - assert(issues.export['ns.ts']['z'].symbol === 'z'); + assert(issues.export['dep.ts']['unused'].symbol === 'unused'); - assert(Object.values(issues.type).length === 2); + assert(Object.values(issues.type).length === 1); assert(issues.type['dep.ts']['Dep'].symbolType === 'type'); - assert(issues.type['ns.ts']['NS'].symbolType === 'interface'); + + assert(Object.values(issues.member).length === 1); + assert(issues.member['ns.ts']['NS'].symbol === 'NS'); + assert(issues.member['ns.ts']['z'].symbol === 'z'); assert(Object.values(issues.duplicate).length === 1); assert(issues.duplicate['dep.ts']['dep,default'].symbols?.[0] === 'dep');