feat: solution for 'Повторный экзамен: Граф с рефлексией и доработкой'

This commit is contained in:
2026-07-01 16:14:52 +03:00
parent 1c6bbc04af
commit 5801947c0d
8 changed files with 376 additions and 279 deletions
+10
View File
@@ -0,0 +1,10 @@
const { Graph, createNode } = require('../src/index');
test('Graph runs nodes sequentially', () => {
const graph = new Graph();
graph.addNode(createNode('Rewrite', { pattern: /foo/g, replacement: 'bar' }));
graph.addNode(createNode('Reflection'));
const input = 'foo';
const output = graph.run(input);
expect(output).toBe('bar');
});