Closed
Description
Suggestion
From e.g. https://cloud.nx.app/runs/95hV1MAyEv:
...
FAIL tests/typeFlagUtils.test.ts
● typeFlagUtils › getTypeFlags › when code is "type Test = any;", type flags is 1
TypeError: Cannot read properties of undefined (reading 'id')
19 | const declaration = ast.body[0] as TSESTree.TSTypeAliasDeclaration;
20 |
> 21 | return services.getTypeAtLocation(declaration.id);
| ^
22 | }
23 |
24 | describe('getTypeFlags', () => {
at id (tests/typeFlagUtils.test.ts:21:51)
at getType (tests/typeFlagUtils.test.ts:29:20)
FAIL tests/getTypeName.test.ts
● getTypeName › returns primitive type › when code is type Test = string;, returns string
TypeError: Cannot read properties of undefined (reading 'id')
20 | const declaration = ast.body[0] as TSESTree.TSTypeAliasDeclaration;
21 |
> 22 | return { checker, type: services.getTypeAtLocation(declaration.id) };
| ^
23 | }
24 |
25 | function runTest(code: string, expected: string): void {
at id (tests/getTypeName.test.ts:22:68)
at getTypes (tests/getTypeName.test.ts:26:31)
Test Suites: 2 failed, 4 passed, 6 total
I'm confused by this. I merged the latest main
from this repo into v8
, but it's not happening for me locally. What are these test failures...?
🤷