CoolFace
Datasetpublic

basant307/AI_Governance_Project

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes48downloads
index.js65 linesDownload Raw Back to tests
1var test = require('tape');2var functionsHaveNames = require('functions-have-names');3var hasSymbols = require('has-symbols');4 5require('./legacy-compat');6var common = require('./common');7 8// we do this to easily wrap each file in a mocha test9// and also have browserify be able to statically analyze this file10var orig_require = require;11var require = function(file) {12    test(file, function(t) {13        // Store the tape object so tests can access it.14        t.on('end', function () { delete common.test; });15        common.test = t;16 17        try {18          var exp = orig_require(file);19          if (exp && exp.then) {20            exp.then(function () { t.end(); }, t.fail);21            return;22          }23        } catch (err) {24          t.fail(err);25        }26        t.end();27    });28};29 30require('./add-listeners.js');31require('./check-listener-leaks.js');32require('./errors.js');33require('./events-list.js');34if (typeof Promise === 'function') {35  require('./events-once.js');36} else {37  // Promise support is not available.38  test('./events-once.js', { skip: true }, function () {});39}40require('./listener-count.js');41require('./listeners-side-effects.js');42require('./listeners.js');43require('./max-listeners.js');44if (functionsHaveNames()) {45  require('./method-names.js');46} else {47  // Function.name is not supported in IE48  test('./method-names.js', { skip: true }, function () {});49}50require('./modify-in-emit.js');51require('./num-args.js');52require('./once.js');53require('./prepend.js');54require('./set-max-listeners-side-effects.js');55require('./special-event-names.js');56require('./subclass.js');57if (hasSymbols()) {58  require('./symbols.js');59} else {60  // Symbol is not available.61  test('./symbols.js', { skip: true }, function () {});62}63require('./remove-all-listeners.js');64require('./remove-listeners.js');65 
basant307/AI_Governance_Project · CoolFace