mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Added unit test
This commit is contained in:
parent
299d4fb895
commit
5345c1ff0a
@ -230,4 +230,27 @@ describe("TransformUtils suite", function() {
|
||||
]);
|
||||
});
|
||||
|
||||
});
|
||||
/*******************************/
|
||||
/*********** CENTER ************/
|
||||
/*******************************/
|
||||
|
||||
it("centers a frame", function () {
|
||||
// create frame
|
||||
var frame = pskl.model.Frame.fromPixelGrid(toFrameGrid([
|
||||
[A, B, O, O],
|
||||
[B, A, O, 0],
|
||||
[O, O, O, O],
|
||||
[O, O, O, O]
|
||||
]));
|
||||
|
||||
// should be centered
|
||||
pskl.tools.transform.TransformUtils.center(frame);
|
||||
frameEqualsGrid(frame, [
|
||||
[O, O, O, O],
|
||||
[O, A, B, O],
|
||||
[O, B, A, O],
|
||||
[O, O, O, O]
|
||||
]);
|
||||
});
|
||||
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user