-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Martin Azpillaga Aldalur
committed
Nov 28, 2023
1 parent
70287e4
commit 5200bca
Showing
2 changed files
with
24 additions
and
1 deletion.
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,23 @@ | ||
import { test } from "mocha"; | ||
import { JSONASTParser } from "../../main/typescript/ast/parser"; | ||
import { readFileSync } from "fs"; | ||
import assert from "assert"; | ||
|
||
test("comprehensive is invalid configuration", () => | ||
{ | ||
let code = readFileSync(`${__dirname}/../resources/comprehensive.json`).toString(); | ||
let parser = new JSONASTParser(); | ||
let ast = parser.parse(code); | ||
|
||
assert(!ast.correct); | ||
}); | ||
|
||
|
||
test("configuration is valid configuration", () => | ||
{ | ||
let code = readFileSync(`${__dirname}/../resources/configuration.json`).toString(); | ||
let parser = new JSONASTParser(); | ||
let ast = parser.parse(code); | ||
|
||
assert(ast.correct); | ||
}); |