mirror of
https://github.com/n8n-io/n8n.git
synced 2026-10-22 12:31:57 +02:00
12 lines
384 B
TypeScript
12 lines
384 B
TypeScript
import { NodeTestHarness } from '@nodes-testing/node-test-harness';
|
|
import { matchesRegex } from '../SwitchV2.node';
|
|
|
|
describe('Execute Switch Node', () => {
|
|
new NodeTestHarness().setupTests();
|
|
|
|
it('matches slash-delimited regex rules', () => {
|
|
expect(matchesRegex('alpha-123', '/^alpha-\\d+$/')).toBe(true);
|
|
expect(matchesRegex('beta', '/^alpha-\\d+$/')).toBe(false);
|
|
});
|
|
});
|