-
-
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
6ac3a45
commit f578b08
Showing
6 changed files
with
83 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,60 @@ | ||
/** | ||
* @file Type Tests - Content | ||
* @module esast/content/tests/unit-d/Content | ||
*/ | ||
|
||
import type { | ||
Declaration, | ||
ExportDeclaration, | ||
Expression, | ||
Heritage, | ||
LiteralValue, | ||
ModuleDeclaration, | ||
Pattern, | ||
Primitive, | ||
RootChild, | ||
Statement | ||
} from '@flex-development/esast' | ||
import type TestSubject from '../content' | ||
|
||
describe('unit-d:content/Content', () => { | ||
it('should extract Declaration', () => { | ||
expectTypeOf<TestSubject>().extract<Declaration>().not.toBeNever() | ||
}) | ||
|
||
it('should extract ExportDeclaration', () => { | ||
expectTypeOf<TestSubject>().extract<ExportDeclaration>().not.toBeNever() | ||
}) | ||
|
||
it('should extract Expression', () => { | ||
expectTypeOf<TestSubject>().extract<Expression>().not.toBeNever() | ||
}) | ||
|
||
it('should extract Heritage', () => { | ||
expectTypeOf<TestSubject>().extract<Heritage>().not.toBeNever() | ||
}) | ||
|
||
it('should extract LiteralValue', () => { | ||
expectTypeOf<TestSubject>().extract<LiteralValue>().not.toBeNever() | ||
}) | ||
|
||
it('should extract ModuleDeclaration', () => { | ||
expectTypeOf<TestSubject>().extract<ModuleDeclaration>().not.toBeNever() | ||
}) | ||
|
||
it('should extract Pattern', () => { | ||
expectTypeOf<TestSubject>().extract<Pattern>().not.toBeNever() | ||
}) | ||
|
||
it('should extract Primitive', () => { | ||
expectTypeOf<TestSubject>().extract<Primitive>().not.toBeNever() | ||
}) | ||
|
||
it('should extract RootChild', () => { | ||
expectTypeOf<TestSubject>().extract<RootChild>().not.toBeNever() | ||
}) | ||
|
||
it('should extract Statement', () => { | ||
expectTypeOf<TestSubject>().extract<Statement>().not.toBeNever() | ||
}) | ||
}) |
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 Content - Content | ||
* @module esast/content/Content | ||
*/ | ||
|
||
import type { Heritage, Pattern, RootChild } from '@flex-development/esast' | ||
|
||
/** | ||
* Union of registered content model nodes. | ||
*/ | ||
type Content = Heritage | Pattern | RootChild | ||
|
||
export type { Content as default } |
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
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"exclude": ["**/coverage", "**/dist", "**/node_modules"], | ||
"extends": "./tsconfig.json", | ||
"include": ["**/**.ts", "**/.*.ts"] | ||
"files": ["__tests__/setup/index.d.mts", "vitest-env.d.ts"], | ||
"include": ["__tests__/**/**.ts", "src/**/**.ts", "src/**/.*.ts"] | ||
} |