Skip to content

Commit

Permalink
完善单元测试
Browse files Browse the repository at this point in the history
  • Loading branch information
yusangeng committed Feb 15, 2019
1 parent 2e372fe commit 38b3e0c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
})
Expand Down

0 comments on commit 38b3e0c

Please sign in to comment.