Newer
Older
const { sequentNode, linkSequentNode } = require("../../src/utils/sequentAst.js");
// linkSequentNode test
test('linkSequentNode could work correctly for node', () => {
Jenny Zhang
committed
const inputA = new sequentNode("A", "A");
const inputB = new sequentNode("B", "B");
const output = linkSequentNode(inputA, inputB);
Jenny Zhang
committed
const expected = new sequentNode("A","A", "", [inputB]);
expect(output).toEqual(expected);
});
test('linkSequentNode could work correctly for node', () => {
Jenny Zhang
committed
const inputA = new sequentNode("A", "A");
const inputB = new sequentNode("B", "B");
const output = linkSequentNode(inputA, inputB);
const output1 = linkSequentNode(output, inputB);
Jenny Zhang
committed
expect(output1).toEqual(new sequentNode("A", "A","", [inputB, inputB]));