From a77a0945feaa22043e76064a948ada1a5f69160f Mon Sep 17 00:00:00 2001 From: Kit Cambridge Date: Wed, 26 Sep 2012 09:26:40 -0600 Subject: [PATCH] Add tests for the `-d` and `-m` options. Former-commit-id: def5bcf323aaed96c037fea3e15c4a5c8c72a977 --- test/test-build.js | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/test/test-build.js b/test/test-build.js index d35fcb737..382b9070e 100644 --- a/test/test-build.js +++ b/test/test-build.js @@ -460,6 +460,40 @@ /*--------------------------------------------------------------------------*/ + QUnit.module('independent builds'); + + (function() { + asyncTest('debug only', function() { + build(['-d', '-s'], function(source, filepath) { + equal(path.basename(filepath, '.js'), 'lodash'); + start(); + }); + }); + + asyncTest('debug custom', function () { + build(['-d', '-s', 'backbone'], function(source, filepath) { + equal(path.basename(filepath, '.js'), 'lodash.custom'); + start(); + }); + }); + + asyncTest('minified only', function() { + build(['-m', '-s'], function(source, filepath) { + equal(path.basename(filepath, '.js'), 'lodash.min'); + start(); + }); + }); + + asyncTest('minified custom', function () { + build(['-m', '-s', 'backbone'], function(source, filepath) { + equal(path.basename(filepath, '.js'), 'lodash.custom.min'); + start(); + }); + }); + }()); + + /*--------------------------------------------------------------------------*/ + QUnit.module('strict modifier'); (function() {