buildDocs/mixin.spec.js
import * as tslib_1 from "tslib";
import { expect } from 'chai';
import { Mixin } from './mixin';
describe('mixin', () => {
it('should mixin the object', () => {
const myApi = {
fn2() { }
};
let MyClass = class MyClass {
fn() { }
};
MyClass = tslib_1.__decorate([
Mixin(myApi)
], MyClass);
const myClass = new MyClass();
expect(myClass.fn2).to.be.a('function');
expect(MyClass.prototype.fn2).to.be.a('function');
});
});