File tree Expand file tree Collapse file tree 6 files changed +7
-40
lines changed Expand file tree Collapse file tree 6 files changed +7
-40
lines changed Original file line number Diff line number Diff line change 5656 "depcheck" : " depcheck" ,
5757 "check" : " npm run typecheck && npm run lint && npm run depcheck" ,
5858 "check-ci" : " npm run check" ,
59+ "pretest" : " npm run test-types" ,
5960 "test" : " mocha" ,
6061 "test-cov" : " nyc --compact=false --produce-source-map=false -x \" **/*.spec.*\" --reporter=lcov --reporter=text --reporter=html npm run test" ,
6162 "test-watch" : " npm run test -- --watch" ,
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- import { expectType , expectError } from 'tsd' ;
1+ import { expectError } from 'tsd' ;
22import { CompassWeb } from '@mongodb-js/compass-web' ;
33
44// Test basic props structure
@@ -21,7 +21,7 @@ void CompassWeb({
2121 } ,
2222} ) ;
2323
24- // This should cause an error - optInDataExplorerGenAIFeatures is internal only
24+ // This should cause an error - optInDataExplorerGenAIFeatures is an old name
2525expectError (
2626 CompassWeb ( {
2727 ...basicProps ,
@@ -30,9 +30,3 @@ expectError(
3030 } ,
3131 } )
3232) ;
33-
34- // Test that built-in types are properly accessible (URL should be global)
35- expectType < URL > ( new URL ( 'https://example.com' ) ) ;
36-
37- // Basic smoke test - if we can get here, the main types are working
38- expectType < string > ( 'test-success' ) ;
Original file line number Diff line number Diff line change 44 "private" : true ,
55 "description" : " Test package to verify compass-web types work correctly for external consumers" ,
66 "scripts" : {
7- "test" : " tsd" ,
8- "install-compass-web" : " npm pack ../../ && npm install *.tgz --save && rm *.tgz" ,
9- "pretest" : " npm run install-compass-web"
7+ "test" : " tsd --typings ./node_modules/@mongodb-js/compass-web/dist/compass-web.d.ts --files ./*.test-d.ts"
108 },
119 "dependencies" : {
12- "@mongodb-js/compass-web" : " file:mongodb-js-compass-web-0.20.1.tgz " ,
10+ "@mongodb-js/compass-web" : " file:../../ " ,
1311 "react" : " ^17.0.2" ,
1412 "react-dom" : " ^17.0.2"
1513 },
1816 "@types/react-dom" : " ^17.0.2" ,
1917 "tsd" : " ^0.31.0" ,
2018 "typescript" : " ^5.0.0"
21- },
22- "tsd" : {
23- "directory" : " ." ,
24- "compilerOptions" : {
25- "strict" : false ,
26- "target" : " esnext" ,
27- "module" : " commonjs" ,
28- "moduleResolution" : " node" ,
29- "skipLibCheck" : true
30- }
3119 }
3220}
Original file line number Diff line number Diff line change 99 "skipLibCheck" : true ,
1010 "forceConsistentCasingInFileNames" : true ,
1111 "declaration" : false ,
12- "noEmit" : true
12+ "noEmit" : true ,
13+ "typeRoots" : [" ./node_modules/@types" ]
1314 },
1415 "include" : [" **/*.test-d.ts" ]
1516}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments