Skip to content

Commit

Permalink
Add test for functions to be deprecated in v2
Browse files Browse the repository at this point in the history
  • Loading branch information
bas080 committed Dec 4, 2021
1 parent 297ba79 commit 938f061
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/index.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const { test } = require('tape')
const { isNil } = require('./helpers')
const { check, gen } = require('tape-check')
const { version } = require('../package')
const {
reference,
instanceOf,
Expand Down Expand Up @@ -190,3 +192,14 @@ test('Does not throw when value is recursive', t => {
t.plan(1)
t.ok(patroon({ a: _ }, true)(circular))
})

if (version.startsWith('2')) {

test('Deprecated functions in version 2', t => {
t.plan(3)
t.ok(isNil(require('./index').typed))
t.ok(isNil(require('./index').t))
t.ok(isNil(require('./index').ref))
})

}

0 comments on commit 938f061

Please sign in to comment.