Permalink
Browse files

Add tests for the `-d` and `-m` options.

  • Loading branch information...
1 parent f862af0 commit 4d53df30bf3ba1919a62c33c2a1281568da19535 @kitcambridge kitcambridge committed Sep 26, 2012
Showing with 34 additions and 0 deletions.
  1. +34 −0 test/test-build.js
View
@@ -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() {

0 comments on commit 4d53df3

Please sign in to comment.