We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
ErrorCode
1 parent b3ca4a7 commit 964c15bCopy full SHA for 964c15b
src/enums/__tests__/error-code.spec-d.ts
@@ -7,8 +7,12 @@ import type TestSubject from '../error-code'
7
8
describe('unit-d:enums/ErrorCode', () => {
9
it('should have members of type Uppercase<string>', () => {
10
- expectTypeOf<typeof TestSubject>()
11
- .extract<Uppercase<string>>()
12
- .not.toBeNever()
+ // Arrange
+ type Key = keyof typeof TestSubject
+
13
+ // Expect
14
+ expectTypeOf<Key>().toMatchTypeOf<Uppercase<string>>()
15
+ expectTypeOf<TestSubject>().toMatchTypeOf<Key>()
16
+ expectTypeOf<typeof TestSubject[Key]>().toEqualTypeOf<TestSubject>()
17
})
18
0 commit comments