mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-11 19:00:00 +01:00
* default sequencer ui test * default step ui test suite * intermediate step ui test * preview ui test suite * url methods test suite * add set url params method test suite * argument call tests * test directory refactor * travis fix
18 lines
949 B
JavaScript
18 lines
949 B
JavaScript
var test = require('tape');
|
|
|
|
var red = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCAAQABADASIAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAf/xAAUEAEAAAAAAAAAAAAAAAAAAAAA/8QAFQEBAQAAAAAAAAAAAAAAAAAABgj/xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwCdABykX//Z";
|
|
|
|
var parseCornerCoordinateInputs = require('../../../src/util/ParseInputCoordinates');
|
|
|
|
|
|
test('parseCornerCoordinateInputs works.', function (t) {
|
|
var options = { x: '10%' },
|
|
coord = { src: red, x: { valInp: options.x, type: 'horizontal' } }
|
|
callback = function (options, coord) {
|
|
options.x = parseInt(coord.x.valInp);
|
|
t.equal(options.x, 1, 'parseCornerCoordinateInputs works.');
|
|
t.end();
|
|
};
|
|
parseCornerCoordinateInputs(options, coord, callback);
|
|
});
|