mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
feat(editor): Migrate codemirror-lang-n8n-expression into this monorepo (no-changelog) (#9087)
Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
This commit is contained in:
committed by
GitHub
parent
aa397b9730
commit
244520547b
@@ -0,0 +1,21 @@
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import { fileTests as runTestFile } from '@lezer/generator/dist/test';
|
||||
import { n8nLanguage } from '../../src/expressions/index';
|
||||
|
||||
describe('expressions language', () => {
|
||||
const CASES_DIR = __dirname;
|
||||
for (const testFile of fs.readdirSync(CASES_DIR)) {
|
||||
if (!/\.txt$/.test(testFile)) continue;
|
||||
|
||||
const testFileName = /^[^\.]*/.exec(testFile)![0];
|
||||
describe(testFileName, () => {
|
||||
for (const { name, run } of runTestFile(
|
||||
fs.readFileSync(path.join(CASES_DIR, testFile), 'utf8'),
|
||||
testFile,
|
||||
)) {
|
||||
it(name, () => run(n8nLanguage.parser));
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user