Skip to content

Commit 68080de

Browse files
committed
test: unit clone with new flowchartId
1 parent 65f1f96 commit 68080de

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/unit.test.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { expect } from "chai";
2+
3+
import { createWorkflows } from "../src/workflows";
4+
5+
describe("units", () => {
6+
it("can be cloned with new flowchartId", () => {
7+
const workflows = createWorkflows({});
8+
const exampleWorkflow = workflows[0];
9+
const exampleSubworkflow = exampleWorkflow.subworkflows[0];
10+
const exampleUnit = exampleSubworkflow.units[0];
11+
const exampleUnitClone = exampleUnit.clone();
12+
expect(exampleUnitClone).to.exist;
13+
expect(exampleUnit.flowchartId).to.not.equal(exampleUnitClone.flowchartId);
14+
});
15+
});

0 commit comments

Comments
 (0)