Add tests to check that _.support properties aren't minified.

This commit is contained in:
John-David Dalton
2013-09-19 09:20:42 -07:00
parent 86376616ff
commit 2ebdbd565a
5 changed files with 47 additions and 47 deletions

View File

@@ -3609,27 +3609,27 @@
(function() {
test('should contain properties with boolean values', function() {
ok(_.every(_.values(_.support), _.isBoolean));
});
test('should not contain minified properties (test production builds)', function() {
var props = [
'argsObject',
'argsClass',
'argsObject',
'enumErrorProps',
'enumPrototypes',
'fastBind',
'fastKeys',
'funcDecomp',
'funcNames',
'ownLast',
'nodeClass',
'nonEnumArgs',
'nonEnumShadows',
'spliceObjects',
'unindexedChars',
'nodeClass'
'unindexedChars'
];
_.forEach(props, function(prop) {
if (_.has(_.support, prop)) {
equal(typeof _.support[prop], 'boolean');
} else {
skipTest();
}
});
ok(!_.size(_.difference(_.keys(_.support), props)));
});
}());