mirror of
https://gitee.com/antv/g6.git
synced 2024-12-04 20:59:15 +08:00
fix: test random-spec expect
This commit is contained in:
parent
221f5bbd26
commit
1cbc40ffd0
@ -100,7 +100,7 @@
|
||||
"screenshot": "node ./bin/screenshot.js",
|
||||
"start": "npm run dev",
|
||||
"test": "torch --compile --renderer --opts test/mocha.opts --recursive ./test/unit",
|
||||
"test-live": "torch --compile --interactive --watch --opts test/mocha.opts --recursive ./test/unit/graph/graph-spec.js",
|
||||
"test-live": "torch --compile --interactive --watch --opts test/mocha.opts --recursive ./test/unit/",
|
||||
"test-bugs": "torch --compile --renderer --recursive ./test/bugs",
|
||||
"test-bugs-live": "torch --compile --interactive --watch --recursive ./test/bugs",
|
||||
"test-all": "npm run test && npm run test-bugs",
|
||||
|
@ -20,7 +20,7 @@ const data = {
|
||||
]
|
||||
};
|
||||
|
||||
describe('random', () => {
|
||||
describe('random by default', () => {
|
||||
it('new graph without layout', () => {
|
||||
const graph = new G6.Graph({
|
||||
container: div,
|
||||
@ -29,6 +29,9 @@ describe('random', () => {
|
||||
});
|
||||
graph.data(data);
|
||||
graph.render();
|
||||
// expect(length - div.childNodes.length).to.equal(1);
|
||||
expect(graph.getNodes()[0].getModel().x).not.to.be.undefined;
|
||||
expect(graph.getNodes()[0].getModel().y).not.to.be.undefined;
|
||||
expect(graph.getNodes()[1].getModel().x).not.to.be.undefined;
|
||||
expect(graph.getNodes()[1].getModel().y).not.to.be.undefined;
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user