mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
23 lines
480 B
JavaScript
23 lines
480 B
JavaScript
|
describe("Palette", function() {
|
||
|
|
||
|
beforeEach(function() {});
|
||
|
afterEach(function() {});
|
||
|
|
||
|
it("moves colors correctly", function() {
|
||
|
// when
|
||
|
var colors = [
|
||
|
'#000000',
|
||
|
'#111111',
|
||
|
'#222222'
|
||
|
];
|
||
|
var palette = new pskl.model.Palette('id', 'name', colors);
|
||
|
|
||
|
// then
|
||
|
palette.move(2,0);
|
||
|
|
||
|
// verify
|
||
|
expect(palette.get(0)).toBe('#222222');
|
||
|
expect(palette.get(1)).toBe('#000000');
|
||
|
expect(palette.get(2)).toBe('#111111');
|
||
|
});
|
||
|
});
|