Add test for transform toString
This commit is contained in:
@@ -11,6 +11,7 @@ import {
|
|||||||
scale,
|
scale,
|
||||||
set,
|
set,
|
||||||
setFromArray,
|
setFromArray,
|
||||||
|
toString,
|
||||||
translate,
|
translate,
|
||||||
} from '../../../../src/ol/transform.js';
|
} from '../../../../src/ol/transform.js';
|
||||||
|
|
||||||
@@ -177,4 +178,12 @@ describe('ol.transform', function () {
|
|||||||
expect(point).to.eql([3, 5]);
|
expect(point).to.eql([3, 5]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
describe('toString()', function () {
|
||||||
|
it('compares with value read back from node', function () {
|
||||||
|
const mat = [1 / 3, 0, 0, 1 / 3, 0, 0];
|
||||||
|
const node = document.createElement('div');
|
||||||
|
node.style.transform = 'matrix(' + mat.join(',') + ')';
|
||||||
|
expect(toString(mat)).to.be(node.style.transform);
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user