Improve process for syncing xlang tests

This commit is contained in:
Josh Gross
2023-02-17 18:36:00 -05:00
parent 2c148d1595
commit 1b0873b40f
97 changed files with 932 additions and 133 deletions
+4 -1
View File
@@ -20,10 +20,13 @@ const nullTrace: TraceWriter = {
};
const testFiles = "./testdata/reader";
const skippedTestsFile = "./testdata/skipped-tests.txt";
describe("x-lang tests", () => {
const files = fs.readdirSync(testFiles);
const skippedTests = new Set(fs.readFileSync(skippedTestsFile, "utf8").split(/\n/));
for (const file of files) {
const fileName = path.join(testFiles, file);
@@ -42,7 +45,7 @@ describe("x-lang tests", () => {
expect(testDocs.length).toBeGreaterThanOrEqual(3);
const testOptions: TestOptions = YAML.parse(testDocs[0]);
const unsupportedTest = contains(testOptions.skip, "TypeScript");
const unsupportedTest = skippedTests.has(file);
const test = async () => {
const testFileName = ".github/workflows" + fileName.substring(fileName.lastIndexOf("/"));