From 3f6116f28facb6477edcbed8aa886c639db3d593 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sun, 23 Jun 2013 13:25:48 -0700 Subject: [PATCH] Add `underscore` build test for lack of AMD support. Former-commit-id: ac1412ff63160d94fa80b982652ba4e10ac894fb --- test/test-build.js | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/test/test-build.js b/test/test-build.js index 905773f71..79af58a3a 100644 --- a/test/test-build.js +++ b/test/test-build.js @@ -1029,6 +1029,27 @@ }); }); + asyncTest('should not have AMD support', function() { + var start = _.after(2, _.once(QUnit.start)); + + build(['-s', 'underscore'], function(data) { + var basename = path.basename(data.outputPath, '.js'), + context = createContext(), + pass = true; + + context.define = function(fn) { + pass = false; + context._ = fn(); + }; + + context.define.amd = {}; + vm.runInContext(source, context); + + ok(pass, basename); + start(); + }); + }); + asyncTest('should not have any Lo-Dash-only methods', function() { var start = _.after(2, _.once(QUnit.start)); @@ -1579,9 +1600,9 @@ 'category=collections,functions', 'backbone category=utilities minus=first,last', 'legacy include=defer', + 'mobile strict category=functions exports=amd,global plus=pick,uniq', 'modern strict include=isArguments,isArray,isFunction,isPlainObject,key', - 'underscore include=debounce,throttle plus=after minus=throttle', - 'underscore strict category=functions exports=amd,global plus=pick,uniq', + 'underscore include=debounce,throttle plus=after minus=throttle' ] .concat( allMethods.map(function(methodName) {