Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('test offset', function () {
let result = pathAdjust(clone(path), 1, 1, 10, 10);
assert.deepEqual(result, [
{
x: 60,
y: 60
},
{
x: 110,
y: 110
}
]);
result = pathAdjust(clone(path), 2, 2, 10, 10);
assert.deepEqual(result, [
{
x: 120,
y: 120
},
{
x: 220,
y: 220
}
]);
});
it('test offset', function () {
let result = pathAdjust(clone(path), 1, 1, 10, 10);
assert.deepEqual(result, [
{
x: 60,
y: 60
},
{
x: 110,
y: 110
}
]);
result = pathAdjust(clone(path), 2, 2, 10, 10);
assert.deepEqual(result, [
{
x: 120,
y: 120
it('test default', function () {
let result = pathAdjust(clone(path));
assert.deepEqual(result, [
{
x: 50,
y: 50
},
{
x: 100,
y: 100
}
]);
result = pathAdjust(clone(path), 1, 1);
assert.deepEqual(result, [
{
x: 50,
y: 50
it('test scale', function () {
let result = pathAdjust(clone(path), 2, 2);
assert.deepEqual(result, [
{
x: 100,
y: 100
},
{
x: 200,
y: 200
}
]);
result = pathAdjust(clone(path), 0.5, 1);
assert.deepEqual(result, [
{
x: 25,
y: 50
},
{
x: 50,
y: 100
}
]);
result = pathAdjust(clone(path), 1, 2, 0, 0);
assert.deepEqual(result, [
{
x: 50,
y: 100
it('test default', function () {
let result = pathAdjust(clone(path));
assert.deepEqual(result, [
{
x: 50,
y: 50
},
{
x: 100,
y: 100
}
]);
result = pathAdjust(clone(path), 1, 1);
assert.deepEqual(result, [
{
x: 50,
y: 50
},
{
x: 100,
y: 100
}
]);
result = pathAdjust(clone(path), 1, 1, 0, 0);
assert.deepEqual(result, [
{
x: 50,
y: 50
it('test scale', function () {
let result = pathAdjust(clone(path), 2, 2);
assert.deepEqual(result, [
{
x: 100,
y: 100
},
{
x: 200,
y: 200
}
]);
result = pathAdjust(clone(path), 0.5, 1);
assert.deepEqual(result, [
{
x: 25,
y: 50
}
]);
result = pathAdjust(clone(path), 0.5, 1);
assert.deepEqual(result, [
{
x: 25,
y: 50
},
{
x: 50,
y: 100
}
]);
result = pathAdjust(clone(path), 1, 2, 0, 0);
assert.deepEqual(result, [
{
x: 50,
y: 100
},
{
x: 100,
y: 200
}
]);
});
}
]);
result = pathAdjust(clone(path), 1, 1);
assert.deepEqual(result, [
{
x: 50,
y: 50
},
{
x: 100,
y: 100
}
]);
result = pathAdjust(clone(path), 1, 1, 0, 0);
assert.deepEqual(result, [
{
x: 50,
y: 50
},
{
x: 100,
y: 100
}
]);
});