|
@@ -0,0 +1,14 @@
|
|
|
+import checkTypes from '../checkTypes';
|
|
|
+
|
|
|
+export default test => {
|
|
|
+ test.ok(typeof checkTypes === 'function', 'checkTypes should be a function');
|
|
|
+
|
|
|
+ const values = [1, 'two', {}, [], null];
|
|
|
+ const types = ['number', 'string', Object, Array, null];
|
|
|
+ test.ok(checkTypes(values, types) === true, 'types should match');
|
|
|
+
|
|
|
+ const wrongTypes = ['number', 'string', Object, String, null];
|
|
|
+ test.ok(checkTypes(values, wrongTypes) === false, 'types should not match');
|
|
|
+
|
|
|
+ test.done();
|
|
|
+};
|