Files
konva/test/unit/Polygon-test.ts
Nathan Muir 758adcd502 refactor: remove rename-imports scripts
Update approach of dealing with file extensions differences between typescript & node.

Leverages `rewriteRelativeImportExtensions` that was added in typescript 5.7 [1], and that is recommended path by node to run typescript in the future [2]

[1] https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-7.html#path-rewriting-for-relative-paths

[2] https://nodejs.org/api/typescript.html#type-stripping
2025-08-20 17:12:52 +12:00

26 lines
541 B
TypeScript

import { assert } from 'chai';
import { addStage, Konva } from './test-utils.ts';
describe('Polygon', function () {
it('add polygon', function () {
var stage = addStage();
var layer = new Konva.Layer();
var points = [73, 192, 73, 160, 340, 23, 500, 109, 499, 139, 342, 93];
var poly = new Konva.Line({
points: points,
fill: 'green',
stroke: 'blue',
strokeWidth: 5,
closed: true,
});
layer.add(poly);
stage.add(layer);
assert.equal(poly.getClassName(), 'Line');
});
});