Update tests for es6.

This commit is contained in:
John-David Dalton
2016-02-13 02:18:15 -08:00
parent af46ead30d
commit 4a390bca1c
2 changed files with 5 additions and 5 deletions

View File

@@ -154,13 +154,13 @@
ui.isForeign = RegExp('^(\\w+:)?//').test(build);
// Used to indicate testing a modularized build.
ui.isModularize = /\b(?:amd|commonjs|es6?|node|npm|(index|main)\.js)\b/.test([location.pathname, location.search]);
ui.isModularize = /\b(?:amd|commonjs|es|node|npm|(index|main)\.js)\b/.test([location.pathname, location.search]);
// Used to indicate testing in Sauce Labs' automated test cloud.
ui.isSauceLabs = location.port == '9001';
// Used to indicate that lodash is in strict mode.
ui.isStrict = /\bes6?\b/.test([location.pathname, location.search]);
ui.isStrict = /\bes\b/.test([location.pathname, location.search]);
ui.urlParams = { 'build': build, 'loader': loader };
ui.timing = { 'loadEventEnd': 0 };

View File

@@ -131,8 +131,8 @@
var ui = root.ui || (root.ui = {
'buildPath': filePath,
'loaderPath': '',
'isModularize': /\b(?:amd|commonjs|es6?|node|npm|(index|main)\.js)\b/.test(filePath),
'isStrict': /\bes6?\b/.test(filePath),
'isModularize': /\b(?:amd|commonjs|es|node|npm|(index|main)\.js)\b/.test(filePath),
'isStrict': /\bes\b/.test(filePath),
'urlParams': {}
});
@@ -8165,7 +8165,7 @@
QUnit.test('should return `false` if `Buffer` is not defined', function(assert) {
assert.expect(1);
if (Buffer && lodashBizarro) {
if (!isStrict && Buffer && lodashBizarro) {
assert.strictEqual(lodashBizarro.isBuffer(new Buffer(2)), false);
}
else {