From 38b3e0cd0f8784328b04d6405267bbfd8e4a9957 Mon Sep 17 00:00:00 2001 From: yusangeng Date: Fri, 15 Feb 2019 18:51:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=8D=95=E5=85=83=E6=B5=8B?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/index.spec.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/index.spec.ts b/test/index.spec.ts index 08c260e..32dd251 100644 --- a/test/index.spec.ts +++ b/test/index.spec.ts @@ -5,6 +5,11 @@ import { mix, C, $ } from '../src' chai.should() describe('mix', () => { + it('should throw', async () => { + const fn = () => mix(1 as any) + fn.should.throws() + }) + it('result class should have all properties & methods', async () => { class Foo { a: number = 1 @@ -38,7 +43,7 @@ describe('mix', () => { const BarBaz = mix().with(Bar, Baz) const bz = new BarBaz() - + bz.d().should.be.eq(2) bz.f().should.be.eq(3) })