mirror of
https://github.com/konvajs/konva.git
synced 2025-09-18 18:27:58 +08:00

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
23 lines
642 B
TypeScript
23 lines
642 B
TypeScript
import { assert } from 'chai';
|
|
import { Konva } from './test-utils.ts';
|
|
|
|
describe('Global', function () {
|
|
// ======================================================
|
|
it('test Konva version number', function () {
|
|
assert.equal(!!Konva.version, true);
|
|
});
|
|
|
|
// ======================================================
|
|
it('getAngle()', function () {
|
|
// test that default angleDeg is true
|
|
assert.equal(Konva.angleDeg, true);
|
|
assert.equal(Konva.getAngle(180), Math.PI);
|
|
|
|
Konva.angleDeg = false;
|
|
assert.equal(Konva.getAngle(1), 1);
|
|
|
|
// set angleDeg back to true for future tests
|
|
Konva.angleDeg = true;
|
|
});
|
|
});
|