2021-09-22 23:14:38 +08:00
|
|
|
function equal(val1, val2, message) {
|
|
|
|
if (val1 !== val2) {
|
|
|
|
throw new Error('Not passed: ' + message);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// try to import only core
|
2023-04-14 12:27:56 +08:00
|
|
|
import Konva from '../lib/Core.js';
|
|
|
|
import { Rect } from '../lib/shapes/Rect.js';
|
|
|
|
import '../lib/index-node.js';
|
2021-09-22 23:14:38 +08:00
|
|
|
|
2023-04-14 12:27:56 +08:00
|
|
|
equal(Rect !== undefined, true, 'Rect is defined');
|
2021-09-22 23:14:38 +08:00
|
|
|
|
2023-04-14 12:27:56 +08:00
|
|
|
equal(Konva.Rect, Rect, 'Rect is injected');
|
2021-09-22 23:14:38 +08:00
|
|
|
|
2022-05-06 07:41:17 +08:00
|
|
|
// // just do a simple action
|
2023-04-14 12:27:56 +08:00
|
|
|
const stage = new Konva.Stage();
|
|
|
|
stage.toDataURL();
|