Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiasbynens committed May 5, 2014
1 parent c4eb5c4 commit 5bcc4c7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 29 deletions.
6 changes: 3 additions & 3 deletions package.json
Expand Up @@ -50,9 +50,9 @@
},
"devDependencies": {
"grunt": "~0.4.4",
"grunt-shell": "~0.6.4",
"istanbul": "~0.2.6",
"qunit-clib": "~1.3.0",
"grunt-shell": "~0.7.0",
"istanbul": "~0.2.8",
"qunit-extras": "~1.1.0",
"qunitjs": "~1.11.0",
"requirejs": "~2.1.11"
}
Expand Down
4 changes: 1 addition & 3 deletions rot.js
Expand Up @@ -74,9 +74,7 @@
if (freeModule) { // in Node.js or RingoJS v0.8.0+
freeModule.exports = rot;
} else { // in Narwhal or RingoJS v0.7.0-
for (var key in rot) {
rot.hasOwnProperty(key) && (freeExports[key] = rot[key]);
}
freeExports.rot = rot;
}
} else { // in Rhino or a web browser
root.rot = rot;
Expand Down
35 changes: 12 additions & 23 deletions tests/tests.js
@@ -1,46 +1,35 @@
;(function(root) {
(function(root) {
'use strict';

/** Use a single `load` function */
var load = typeof require == 'function' ? require : root.load;
var noop = Function.prototype;

var load = (typeof require == 'function' && !(root.define && define.amd)) ?
require :
(!root.document && root.java && root.load) || noop;

/** The unit testing framework */
var QUnit = (function() {
var noop = Function.prototype;
return root.QUnit || (
root.addEventListener || (root.addEventListener = noop),
root.setTimeout || (root.setTimeout = noop),
root.QUnit = load('../node_modules/qunitjs/qunit/qunit.js') || root.QUnit,
(load('../node_modules/qunit-clib/qunit-clib.js') || { 'runInContext': noop }).runInContext(root),
addEventListener === noop && delete root.addEventListener,
root.QUnit
);
}());

/** The `rot` object to test */
var qe = load('../node_modules/qunit-extras/qunit-extras.js');
if (qe) {
qe.runInContext(root);
}

// The `rot` object to test
var rot = root.rot || (root.rot = (
rot = load('../rot.js') || root.rot,
rot = rot.rot || rot
));

/*--------------------------------------------------------------------------*/

function forEach(array, fn) {
var index = -1;
var length = array.length;
while (++index < length) {
fn(array[index]);
}
}

function forOwn(object, fn) {
for (var key in object) {
if (object.hasOwnProperty(key)) {
fn(key, object[key]);
}
}
}

// `throws` is a reserved word in ES3; alias it to avoid errors
var raises = QUnit.assert['throws'];

Expand Down

0 comments on commit 5bcc4c7

Please sign in to comment.