feat: remove broken test system in codemirror-lang-graphql
This commit is contained in:
@@ -3,7 +3,6 @@
|
|||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"description": "GraphQL language support for CodeMirror",
|
"description": "GraphQL language support for CodeMirror",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "mocha test/test.js",
|
|
||||||
"prepare": "rollup -c"
|
"prepare": "rollup -c"
|
||||||
},
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
# TODO: Write Lezer Tests
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
import {GQLLanguage} from "../dist/index.js"
|
|
||||||
import {fileTests} from "lezer-generator/dist/test"
|
|
||||||
|
|
||||||
import * as fs from "fs"
|
|
||||||
import * as path from "path"
|
|
||||||
import { fileURLToPath } from 'url';
|
|
||||||
let caseDir = path.dirname(fileURLToPath(import.meta.url))
|
|
||||||
|
|
||||||
for (let file of fs.readdirSync(caseDir)) {
|
|
||||||
if (!/\.txt$/.test(file)) continue
|
|
||||||
|
|
||||||
let name = /^[^\.]*/.exec(file)[0]
|
|
||||||
describe(name, () => {
|
|
||||||
for (let {name, run} of fileTests(fs.readFileSync(path.join(caseDir, file), "utf8"), file))
|
|
||||||
it(name, () => run(GQLLanguage.parser))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user