Skip to content

Commit 48036e0

Browse files
committed
js tests unstability fix
1 parent 384fc2e commit 48036e0

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/bindings/js/node/tests/unit/model.test.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -289,11 +289,10 @@ describe("ov.Model tests", () => {
289289
it("should return node friendly names expected in the calling model", () => {
290290
const model = core.readModelSync(addModel.xml);
291291
const modelOps = model.getOps();
292-
const nodeFriendlyNames = ["data1", "data2", "Add_361", "Result_362"];
293-
assert.deepStrictEqual(modelOps.length, nodeFriendlyNames.length);
294-
for (const [index, nodeName] of nodeFriendlyNames.entries()) {
295-
assert.deepStrictEqual(modelOps[index].getFriendlyName(), nodeName);
296-
}
292+
const expectedNames = new Set(["data1", "data2", "Add_361", "Result_362"]);
293+
assert.deepStrictEqual(modelOps.length, expectedNames.size);
294+
const actualNames = new Set(modelOps.map((node) => node.getFriendlyName()));
295+
assert.deepStrictEqual(actualNames, expectedNames);
297296
});
298297

299298
it("should not accept any arguments", () => {

0 commit comments

Comments
 (0)