diff --git a/define-test.js b/define-test.js index 9398f8a..e04de66 100644 --- a/define-test.js +++ b/define-test.js @@ -1370,40 +1370,44 @@ QUnit.test('define() should add a CID (#246)', function() { QUnit.ok(g._cid, "should have a CID property"); }); -QUnit.test("warn on using a Constructor for small-t type definintions", function() { - expect(2); - var oldWarn = canDev.warn; - canDev.warn = function(mesg) { - QUnit.equal(mesg, "can-define: the definition for currency uses a constructor for \"type\". Did you mean \"Type\"?"); - }; +if (System.env.indexOf("production") < 0) { - function Currency() { - return this; - } - Currency.prototype = { - symbol: "USD" - }; + QUnit.test("warn on using a Constructor for small-t type definintions", function() { + expect(2); + var oldWarn = canDev.warn; + canDev.warn = function(mesg) { + QUnit.equal(mesg, "can-define: the definition for currency uses a constructor for \"type\". Did you mean \"Type\"?"); + }; - function VM() {} - define(VM.prototype, { - currency: { - type: Currency, // should be `Type: Currency` - value: new Currency({}) - } - }); + function Currency() { + return this; + } + Currency.prototype = { + symbol: "USD" + }; - canDev.warn = function(mesg) { - QUnit.equal(mesg, "can-define: the definition for currency on VM2 uses a constructor for \"type\". Did you mean \"Type\"?"); - }; + function VM() {} + define(VM.prototype, { + currency: { + type: Currency, // should be `Type: Currency` + value: new Currency({}) + } + }); + + canDev.warn = function(mesg) { + QUnit.equal(mesg, "can-define: the definition for currency on VM2 uses a constructor for \"type\". Did you mean \"Type\"?"); + }; + + function VM2() {} + VM2.shortName = "VM2"; + define(VM2.prototype, { + currency: { + type: Currency, // should be `Type: Currency` + value: new Currency({}) + } + }); - function VM2() {} - VM2.shortName = "VM2"; - define(VM2.prototype, { - currency: { - type: Currency, // should be `Type: Currency` - value: new Currency({}) - } + canDev.warn = oldWarn; }); - canDev.warn = oldWarn; -}); \ No newline at end of file +} \ No newline at end of file