Home Reference Source Test Repository

buildDocs/spread.spec.js

import * as tslib_1 from "tslib";
import { expect } from 'chai';
import { Spread } from './spread';
describe('spread', () => {
    it('should spread the arguments', () => {
        class MyClass {
            fn(...args) {
                expect(args.length).to.equal(4);
                expect(args).to.eql([1, 2, 3, 4]);
            }
        }
        tslib_1.__decorate([
            Spread()
        ], MyClass.prototype, "fn", null);
        const myClass = new MyClass();
        myClass.fn([1, 2, 3, 4]);
    });
});