Skip to content

Commit

Permalink
Add subclass test case
Browse files Browse the repository at this point in the history
  • Loading branch information
flintinatux committed May 23, 2018
1 parent 7a10aa2 commit 9d22e0d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/is.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@ const { expect } = require('chai')

const { is } = require('..')

class Foo {}
class Bar extends Foo {}

describe('is', () => {
it('tests if object is instance of supplied contructor', () => {
expect(is(Number, 12345)).to.be.true
expect(is(String, 'foo')).to.be.true
expect(is(Foo, new Bar())).to.be.true
})

it('is curried', () =>
Expand Down

0 comments on commit 9d22e0d

Please sign in to comment.