management/front/dkha-web-sz-main/node_modules/semver/test/amd.js

16 lines
354 B
JavaScript
Raw Normal View History

2023-12-18 13:12:25 +08:00
var tap = require('tap');
var test = tap.test;
test('amd', function(t) {
global.define = define;
define.amd = true;
var defined = null;
function define(stuff) {
defined = stuff;
}
var fromRequire = require('../');
t.ok(defined, 'amd function called');
t.equal(fromRequire, defined, 'amd stuff same as require stuff');
t.end();
});