Files
image-sequencer/test/core/util/parse-input.js
Vibhor Gupta 0cd3156c06 Setup UI testing (#720)
* 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
2019-01-31 12:56:34 -05:00

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);
});