feat: remove broken test system in codemirror-lang-graphql

This commit is contained in:
Andrew Bastin
2021-11-15 17:03:04 +05:30
parent 76a3b35e9e
commit 73568043f1
3 changed files with 0 additions and 19 deletions

View File

@@ -3,7 +3,6 @@
"version": "0.1.0",
"description": "GraphQL language support for CodeMirror",
"scripts": {
"test": "mocha test/test.js",
"prepare": "rollup -c"
},
"type": "module",

View File

@@ -1 +0,0 @@
# TODO: Write Lezer Tests

View File

@@ -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))
})
}