Skip to content

Commit c28a7d9

Browse files
committed
fix UT; review by qiw
1 parent e2b0614 commit c28a7d9

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

test/common/overlay/KnowledgeGraphSpec.js

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,7 @@ describe('KnowledgeGraph', () => {
405405
graph.hideItem();
406406
graph.getHeight();
407407
graph.updateGraph(data);
408-
graph.clear();
409-
graph.destroy();
408+
graph.refresh();
410409
} catch {}
411410
done();
412411
});
@@ -443,4 +442,24 @@ describe('KnowledgeGraph', () => {
443442
expect(result.length).toBe(1);
444443
done();
445444
});
445+
446+
it('destroy', (done) => {
447+
var graph = new KnowledgeGraph({ nodeLabelMaxWidth: 100 });
448+
const params = {
449+
destroy: () => {
450+
done();
451+
}
452+
};
453+
graph.destroy(params);
454+
});
455+
456+
it('clear', (done) => {
457+
var graph = new KnowledgeGraph({ nodeLabelMaxWidth: 100 });
458+
const params = {
459+
clear: () => {
460+
done();
461+
}
462+
};
463+
graph.clear(params);
464+
});
446465
});

0 commit comments

Comments
 (0)