Home Reference Source Test Repository

buildDocs/overArgs.spec.js

import * as tslib_1 from "tslib";
import { expect } from 'chai';
import { OverArgs } from './overArgs';
const add = (n) => (v) => v + n;
describe('overArgs', () => {
    it('should transform each argument', () => {
        class MyClass {
            fn(a, b) {
                return [a, b];
            }
        }
        tslib_1.__decorate([
            OverArgs(add(10), add(5))
        ], MyClass.prototype, "fn", null);
        const myClass = new MyClass();
        expect(myClass.fn(5, 50)).to.eql([15, 55]);
    });
});