From 938f0614cc479ce8ed64fc5deacf7964db4adfe2 Mon Sep 17 00:00:00 2001 From: Bas Huis Date: Thu, 2 Dec 2021 08:44:36 +0100 Subject: [PATCH] Add test for functions to be deprecated in v2 --- src/index.test.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/index.test.js b/src/index.test.js index dea81dc..423e761 100755 --- a/src/index.test.js +++ b/src/index.test.js @@ -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, @@ -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)) + }) + +}