2021-04-30 22:24:27 +08:00
|
|
|
// TODO: restore
|
|
|
|
// function equal(val1, val2, message) {
|
|
|
|
// if (val1 !== val2) {
|
|
|
|
// throw new Error('Not passed: ' + message);
|
|
|
|
// }
|
|
|
|
// }
|
2019-02-27 21:06:04 +08:00
|
|
|
|
2021-04-30 22:24:27 +08:00
|
|
|
// // try to import only core
|
|
|
|
// let { Konva } = require('../lib/Core');
|
2019-02-27 21:06:04 +08:00
|
|
|
|
2021-04-30 22:24:27 +08:00
|
|
|
// // no external shapes
|
|
|
|
// equal(Konva.Rect, undefined, 'no external shapes');
|
2019-02-27 21:06:04 +08:00
|
|
|
|
2021-04-30 22:24:27 +08:00
|
|
|
// let Rect = require('../lib/shapes/Rect').Rect;
|
2019-02-27 21:06:04 +08:00
|
|
|
|
2021-04-30 22:24:27 +08:00
|
|
|
// equal(Rect !== undefined, true, 'Rect is defined');
|
2019-02-27 21:06:04 +08:00
|
|
|
|
2021-04-30 22:24:27 +08:00
|
|
|
// equal(Konva.Rect, Rect, 'Rect is injected');
|
2019-02-27 21:06:04 +08:00
|
|
|
|
2021-04-30 22:24:27 +08:00
|
|
|
// // now import from package.json
|
|
|
|
// const oldKonva = Konva;
|
|
|
|
// Konva = require('../');
|
2019-02-28 00:18:21 +08:00
|
|
|
|
2021-04-30 22:24:27 +08:00
|
|
|
// equal(Konva.Rect, Rect, 'Same rects');
|
2019-03-07 11:19:32 +08:00
|
|
|
|
2021-04-30 22:24:27 +08:00
|
|
|
// // check global injection
|
|
|
|
// equal(global.Konva, Konva, 'injected');
|
|
|
|
|
|
|
|
// equal(Konva, oldKonva, 'Full package is the same as core.');
|