Skip to content

Instantly share code, notes, and snippets.

View patkujawa-wf's full-sized avatar

Pat Kujawa patkujawa-wf

  • Workiva
  • Missoula, Montana, USA
View GitHub Profile
@abreckner
abreckner / waitsForAndRuns.js
Created May 9, 2014 01:56
Jasmine 2 plug in to re-enable waitsFor and runs functionality
// This is the equivalent of the old waitsFor/runs syntax
// which was removed from Jasmine 2
waitsForAndRuns = function(escapeFunction, runFunction, escapeTime) {
// check the escapeFunction every millisecond so as soon as it is met we can escape the function
var interval = setInterval(function() {
if (escapeFunction()) {
clearMe();
runFunction();
}
}, 1);
@paularmstrong
paularmstrong / foo.test.js
Last active March 29, 2018 03:00
Mocha test runner with Require.js
define(['modules/foo'], function (foo) {
describe('test foo', function () {
// ...
});
});