Home Reference Source Test Repository

buildDocs/negate.spec.js

import * as tslib_1 from "tslib";
import { expect } from 'chai';
import { Negate } from './negate';
describe('negate', () => {
    it('should inverse the result of the function', () => {
        class MyClass {
            fn() {
                return true;
            }
        }
        tslib_1.__decorate([
            Negate()
        ], MyClass.prototype, "fn", null);
        const myClass = new MyClass();
        expect(myClass.fn()).to.be.false;
    });
});