You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
parttimejob/node_modules/is-class-hotfix/test/babel-class.js

28 lines
595 B

4 weeks ago
'use strict';
var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };
var test = require('tape');
var isClass = require('../is-class');
test('isClass', function (t) {
t.plan(9);
var F = function F() {
_classCallCheck(this, F);
};
function G() {}
t.true(isClass(F));
t.false(isClass(G));
t.false(isClass(''));
t.false(isClass(0));
t.false(isClass(null));
t.false(isClass(undefined));
t.false(isClass(1));
t.false(isClass({}));
t.false(isClass([]));
});