mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 00:57:48 +00:00
Update tests to work around QUnit 1.9.0 bug in Narwhal/older-Firefox and add platform.js to test/index.html.
Former-commit-id: eed8246c795735558ba9f499b86f08ed3970ccaf
This commit is contained in:
10
test/test.js
10
test/test.js
@@ -4,11 +4,17 @@
|
||||
/** Use a single load function */
|
||||
var load = typeof require == 'function' ? require : window.load;
|
||||
|
||||
/** The `platform` object to check */
|
||||
var platform =
|
||||
window.platform ||
|
||||
load('../vendor/platform.js/platform.js') ||
|
||||
window.platform;
|
||||
|
||||
/** The unit testing framework */
|
||||
var QUnit =
|
||||
window.QUnit || (
|
||||
window.setTimeout || (window.addEventListener = window.setTimeout = / /),
|
||||
window.QUnit = load('../vendor/qunit/qunit/qunit.js') || window.QUnit,
|
||||
window.QUnit = load('../vendor/qunit/qunit/qunit' + (platform.name == 'Narwhal' ? '-1.8.0' : '') + '.js') || window.QUnit,
|
||||
load('../vendor/qunit-clib/qunit-clib.js'),
|
||||
(window.addEventListener || 0).test && delete window.addEventListener,
|
||||
window.QUnit
|
||||
@@ -792,7 +798,7 @@
|
||||
});
|
||||
|
||||
test('should raise an error if a template, compiled with errors, is executed', function() {
|
||||
throws(_.template('<% if x %>'));
|
||||
raises(_.template('<% if x %>'));
|
||||
});
|
||||
|
||||
test('should work with complex "interpolate" delimiters', function() {
|
||||
|
||||
Reference in New Issue
Block a user