Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('sets up custom curves correctly', () => {
setBezierFunction('custom', 0, 0.25, 0.5, 0.75);
rekapi = setupTestRekapi();
exportedTimeline = rekapi.exportTimeline();
// Reset for a clean test
unsetBezierFunction('custom');
targetRekapi = new Rekapi();
targetRekapi.importTimeline(exportedTimeline);
assert.equal(typeof Tweenable.formulas.custom, 'function');
assert.equal(Tweenable.formulas.custom.x1, 0);
assert.equal(Tweenable.formulas.custom.y1, 0.25);
assert.equal(Tweenable.formulas.custom.x2, 0.5);
assert.equal(Tweenable.formulas.custom.y2, 0.75);
beforeEach(() => {
setBezierFunction('testCurve', 0, 0, 0, 0);
component.instance().updateEasingList();
});
each(rekapiData.curves, (curve, curveName) =>
setBezierFunction(
curveName,
curve.x1,
curve.y1,
curve.x2,
curve.y2
)
);