dotfiles/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/semver/test/amd.js
Cyryl Płotnicki 2f946d6200 Add .vscode
2016-09-11 10:29:13 +02:00

15 lines
354 B
JavaScript

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();
});