mirror of
https://github.com/n8n-io/n8n.git
synced 2026-05-27 06:45:26 +02:00
18 lines
572 B
TypeScript
18 lines
572 B
TypeScript
import { Tournament } from '../src/index';
|
|
import { FunctionEvaluator } from '../src/FunctionEvaluator';
|
|
import { testExpressionsWithEvaluator } from './utils';
|
|
|
|
const evaluator = new Tournament(() => {});
|
|
|
|
describe('Expression', () => {
|
|
describe('Test all expression evaluation fixtures', () => {
|
|
testExpressionsWithEvaluator(FunctionEvaluator);
|
|
});
|
|
|
|
test('Should throw error when using import', () => {
|
|
expect(() =>
|
|
evaluator.execute('{{ import("").then(fs => fs.writeFileSync("/tmp/flag", "flag")) }}', {}),
|
|
).toThrow('Imports are not supported');
|
|
});
|
|
});
|