konva/test/import-test.mjs

28 lines
615 B
JavaScript
Raw Normal View History

function equal(val1, val2, message) {
if (val1 !== val2) {
throw new Error('Not passed: ' + message);
}
}
// try to import only core
2022-05-06 07:41:17 +08:00
// import Konva from '../';
2022-05-06 07:41:17 +08:00
// // no external shapes
// // equal(Konva.Rect, undefined, 'no external shapes');
2022-05-06 07:41:17 +08:00
// import { Rect } from '../lib/shapes/Rect';
2022-05-06 07:41:17 +08:00
// equal(Rect !== undefined, true, 'Rect is defined');
2022-05-06 07:41:17 +08:00
// equal(Konva.Rect, Rect, 'Rect is injected');
2022-05-06 07:41:17 +08:00
// import Konva2 from '../';
2022-05-06 07:41:17 +08:00
// equal(Konva2.Rect, Rect, 'Rect is injected');
2022-05-06 07:41:17 +08:00
// equal(Konva2, Konva, 'Same Konva');
2022-05-06 07:41:17 +08:00
// // just do a simple action
// const stage = new Konva.Stage();
// stage.toDataURL();