mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 08:07:50 +00:00
Add tests to check that _.support properties aren't minified.
This commit is contained in:
22
test/test.js
22
test/test.js
@@ -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)));
|
||||
});
|
||||
}());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user