buildDocs/rearg.spec.js
import * as tslib_1 from "tslib";
import { expect } from 'chai';
import { Rearg } from './rearg';
describe('rearg', () => {
it('should change the order of arguments', () => {
class MyClass {
fn(a, b, c) {
return [a, b, c];
}
}
tslib_1.__decorate([
Rearg(2, 1, 0)
], MyClass.prototype, "fn", null);
const myClass = new MyClass();
expect(myClass.fn(1, 2, 3)).to.eql([3, 2, 1]);
});
});