-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Lexus Drumgold <unicornware@flexdevelopment.llc>
- Loading branch information
1 parent
17ec0c8
commit eaf2254
Showing
16 changed files
with
602 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,162 @@ | ||
/** | ||
* @file Type Tests - Kind | ||
* @module docast/enums/tests/unit-d/Kind | ||
*/ | ||
|
||
import type { EmptyString } from '@flex-development/tutils' | ||
import type TestSubject from '../kind' | ||
|
||
describe('unit-d:enums/Kind', () => { | ||
it('should match [ACCESSOR = "accessor"]', () => { | ||
expectTypeOf<typeof TestSubject>() | ||
.toHaveProperty('ACCESSOR') | ||
.extract<'accessor'>() | ||
.toBeString() | ||
}) | ||
|
||
it('should match [CLASS = "class"]', () => { | ||
expectTypeOf<typeof TestSubject>() | ||
.toHaveProperty('CLASS') | ||
.extract<'class'>() | ||
.toBeString() | ||
}) | ||
|
||
it('should match [CONST = "const"]', () => { | ||
expectTypeOf<typeof TestSubject>() | ||
.toHaveProperty('CONST') | ||
.extract<'const'>() | ||
.toBeString() | ||
}) | ||
|
||
it('should match [CONSTRUCTOR = "constructor"]', () => { | ||
expectTypeOf<typeof TestSubject>() | ||
.toHaveProperty('CONSTRUCTOR') | ||
.extract<'constructor'>() | ||
.toBeString() | ||
}) | ||
|
||
it('should match [DEFAULT = "default"]', () => { | ||
expectTypeOf<typeof TestSubject>() | ||
.toHaveProperty('DEFAULT') | ||
.extract<'default'>() | ||
.toBeString() | ||
}) | ||
|
||
it('should match [ENUM = "enum"]', () => { | ||
expectTypeOf<typeof TestSubject>() | ||
.toHaveProperty('ENUM') | ||
.extract<'enum'>() | ||
.toBeString() | ||
}) | ||
|
||
it('should match [ENUM_CONST = "const enum"]', () => { | ||
expectTypeOf<typeof TestSubject>() | ||
.toHaveProperty('ENUM_CONST') | ||
.extract<'const enum'>() | ||
.toBeString() | ||
}) | ||
|
||
it('should match [FUNCTION = "function"]', () => { | ||
expectTypeOf<typeof TestSubject>() | ||
.toHaveProperty('FUNCTION') | ||
.extract<'function'>() | ||
.toBeString() | ||
}) | ||
|
||
it('should match [GENERATOR = "function*"]', () => { | ||
expectTypeOf<typeof TestSubject>() | ||
.toHaveProperty('GENERATOR') | ||
.extract<'function*'>() | ||
.toBeString() | ||
}) | ||
|
||
it('should match [GET = "get"]', () => { | ||
expectTypeOf<typeof TestSubject>() | ||
.toHaveProperty('GET') | ||
.extract<'get'>() | ||
.toBeString() | ||
}) | ||
|
||
it('should match [INTERFACE = "interface"]', () => { | ||
expectTypeOf<typeof TestSubject>() | ||
.toHaveProperty('INTERFACE') | ||
.extract<'interface'>() | ||
.toBeString() | ||
}) | ||
|
||
it('should match [LET = "let"]', () => { | ||
expectTypeOf<typeof TestSubject>() | ||
.toHaveProperty('LET') | ||
.extract<'let'>() | ||
.toBeString() | ||
}) | ||
|
||
it('should match [MEMBER = "member"]', () => { | ||
expectTypeOf<typeof TestSubject>() | ||
.toHaveProperty('MEMBER') | ||
.extract<'member'>() | ||
.toBeString() | ||
}) | ||
|
||
it('should match [METHOD = "method"]', () => { | ||
expectTypeOf<typeof TestSubject>() | ||
.toHaveProperty('METHOD') | ||
.extract<'method'>() | ||
.toBeString() | ||
}) | ||
|
||
it('should match [MODULE = "module"]', () => { | ||
expectTypeOf<typeof TestSubject>() | ||
.toHaveProperty('MODULE') | ||
.extract<'module'>() | ||
.toBeString() | ||
}) | ||
|
||
it('should match [NAMESPACE = "namespace"]', () => { | ||
expectTypeOf<typeof TestSubject>() | ||
.toHaveProperty('NAMESPACE') | ||
.extract<'namespace'>() | ||
.toBeString() | ||
}) | ||
|
||
it('should match [PROPERTY = "property"]', () => { | ||
expectTypeOf<typeof TestSubject>() | ||
.toHaveProperty('PROPERTY') | ||
.extract<'property'>() | ||
.toBeString() | ||
}) | ||
|
||
it('should match [SET = "set"]', () => { | ||
expectTypeOf<typeof TestSubject>() | ||
.toHaveProperty('SET') | ||
.extract<'set'>() | ||
.toBeString() | ||
}) | ||
|
||
it('should match [STATEMENT = "statement"]', () => { | ||
expectTypeOf<typeof TestSubject>() | ||
.toHaveProperty('STATEMENT') | ||
.extract<'statement'>() | ||
.toBeString() | ||
}) | ||
|
||
it('should match [TYPE = "type"]', () => { | ||
expectTypeOf<typeof TestSubject>() | ||
.toHaveProperty('TYPE') | ||
.extract<'type'>() | ||
.toBeString() | ||
}) | ||
|
||
it('should match [UNKNOWN = ""]', () => { | ||
expectTypeOf<typeof TestSubject>() | ||
.toHaveProperty('UNKNOWN') | ||
.toMatchTypeOf<EmptyString>() | ||
}) | ||
|
||
it('should match [VAR = "var"]', () => { | ||
expectTypeOf<typeof TestSubject>() | ||
.toHaveProperty('VAR') | ||
.extract<'var'>() | ||
.toBeString() | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
/** | ||
* @file Type Tests - Modifier | ||
* @module docast/enums/tests/unit-d/Modifier | ||
*/ | ||
|
||
import type TestSubject from '../modifier' | ||
|
||
describe('unit-d:enums/Modifier', () => { | ||
it('should match [ABSTRACT = "abstract"]', () => { | ||
expectTypeOf<typeof TestSubject>() | ||
.toHaveProperty('ABSTRACT') | ||
.extract<'abstract'>() | ||
.toBeString() | ||
}) | ||
|
||
it('should match [ASYNC = "async"]', () => { | ||
expectTypeOf<typeof TestSubject>() | ||
.toHaveProperty('ASYNC') | ||
.extract<'async'>() | ||
.toBeString() | ||
}) | ||
|
||
it('should match [DECLARE = "declare"]', () => { | ||
expectTypeOf<typeof TestSubject>() | ||
.toHaveProperty('DECLARE') | ||
.extract<'declare'>() | ||
.toBeString() | ||
}) | ||
|
||
it('should match [DEFAULT = "default"]', () => { | ||
expectTypeOf<typeof TestSubject>() | ||
.toHaveProperty('DEFAULT') | ||
.extract<'default'>() | ||
.toBeString() | ||
}) | ||
|
||
it('should match [EXPORT = "export"]', () => { | ||
expectTypeOf<typeof TestSubject>() | ||
.toHaveProperty('EXPORT') | ||
.extract<'export'>() | ||
.toBeString() | ||
}) | ||
|
||
it('should match [OVERRIDE = "override"]', () => { | ||
expectTypeOf<typeof TestSubject>() | ||
.toHaveProperty('OVERRIDE') | ||
.extract<'override'>() | ||
.toBeString() | ||
}) | ||
|
||
it('should match [PRIVATE = "private"]', () => { | ||
expectTypeOf<typeof TestSubject>() | ||
.toHaveProperty('PRIVATE') | ||
.extract<'private'>() | ||
.toBeString() | ||
}) | ||
|
||
it('should match [PROTECTED = "protected"]', () => { | ||
expectTypeOf<typeof TestSubject>() | ||
.toHaveProperty('PROTECTED') | ||
.extract<'protected'>() | ||
.toBeString() | ||
}) | ||
|
||
it('should match [PUBLIC = "public"]', () => { | ||
expectTypeOf<typeof TestSubject>() | ||
.toHaveProperty('PUBLIC') | ||
.extract<'public'>() | ||
.toBeString() | ||
}) | ||
|
||
it('should match [READONLY = "readonly"]', () => { | ||
expectTypeOf<typeof TestSubject>() | ||
.toHaveProperty('READONLY') | ||
.extract<'readonly'>() | ||
.toBeString() | ||
}) | ||
|
||
it('should match [STATIC = "static"]', () => { | ||
expectTypeOf<typeof TestSubject>() | ||
.toHaveProperty('STATIC') | ||
.extract<'static'>() | ||
.toBeString() | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/** | ||
* @file Type Tests - Type | ||
* @module docast/enums/tests/unit-d/Type | ||
*/ | ||
|
||
import type TestSubject from '../type' | ||
|
||
describe('unit-d:enums/Type', () => { | ||
it('should match [BLOCK_TAG = "block-tag"]', () => { | ||
expectTypeOf<typeof TestSubject>() | ||
.toHaveProperty('BLOCK_TAG') | ||
.extract<'block-tag'>() | ||
.toBeString() | ||
}) | ||
|
||
it('should match [COMMENT = "comment"]', () => { | ||
expectTypeOf<typeof TestSubject>() | ||
.toHaveProperty('COMMENT') | ||
.extract<'comment'>() | ||
.toBeString() | ||
}) | ||
|
||
it('should match [IMPLICIT_DESCRIPTION = "implicit-description"]', () => { | ||
expectTypeOf<typeof TestSubject>() | ||
.toHaveProperty('IMPLICIT_DESCRIPTION') | ||
.extract<'implicit-description'>() | ||
.toBeString() | ||
}) | ||
|
||
it('should match [INLINE_TAG = "inline-tag"]', () => { | ||
expectTypeOf<typeof TestSubject>() | ||
.toHaveProperty('INLINE_TAG') | ||
.extract<'inline-tag'>() | ||
.toBeString() | ||
}) | ||
|
||
it('should match [ROOT = "root"]', () => { | ||
expectTypeOf<typeof TestSubject>() | ||
.toHaveProperty('ROOT') | ||
.extract<'root'>() | ||
.toBeString() | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/** | ||
* @file Type Tests - Context | ||
* @module docast/interfaces/tests/unit-d/Context | ||
*/ | ||
|
||
import type { Kind } from '#src/enums' | ||
import type { LiteralUnion, Nullable } from '@flex-development/tutils' | ||
import type TestSubject from '../context' | ||
import type Position from '../position' | ||
|
||
describe('unit-d:interfaces/Context', () => { | ||
it('should match [identifier: string]', () => { | ||
expectTypeOf<TestSubject>().toHaveProperty('identifier').toBeString() | ||
}) | ||
|
||
it('should match [kind: LiteralUnion<Kind, "string">]', () => { | ||
expectTypeOf<TestSubject>() | ||
.toHaveProperty('kind') | ||
.toEqualTypeOf<LiteralUnion<Kind, 'string'>>() | ||
}) | ||
|
||
it('should match [parent: Nullable<string>]', () => { | ||
expectTypeOf<TestSubject>() | ||
.toHaveProperty('parent') | ||
.toEqualTypeOf<Nullable<string>>() | ||
}) | ||
|
||
it('should match [position: Position]', () => { | ||
expectTypeOf<TestSubject>() | ||
.toHaveProperty('position') | ||
.toEqualTypeOf<Position>() | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/** | ||
* @file Type Tests - Point | ||
* @module docast/interfaces/tests/unit-d/Point | ||
*/ | ||
|
||
import type unist from 'unist' | ||
import type TestSubject from '../point' | ||
|
||
describe('unit-d:interfaces/Point', () => { | ||
it('should extend Required<unist.Point>', () => { | ||
expectTypeOf<TestSubject>().toMatchTypeOf<Required<unist.Point>>() | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/** | ||
* @file Type Tests - Position | ||
* @module docast/interfaces/tests/unit-d/Position | ||
*/ | ||
|
||
import type unist from 'unist' | ||
import type Point from '../point' | ||
import type TestSubject from '../position' | ||
|
||
describe('unit-d:interfaces/Position', () => { | ||
it('should extend unist.Position', () => { | ||
expectTypeOf<TestSubject>().toMatchTypeOf<unist.Position>() | ||
}) | ||
|
||
it('should match [end: Point]', () => { | ||
expectTypeOf<TestSubject>().toHaveProperty('end').toEqualTypeOf<Point>() | ||
}) | ||
|
||
it('should match [start: Point]', () => { | ||
expectTypeOf<TestSubject>().toHaveProperty('start').toEqualTypeOf<Point>() | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.