Skip to content

Instantly share code, notes, and snippets.

@jnugh
Created August 26, 2013 06:54
Show Gist options
  • Save jnugh/6338683 to your computer and use it in GitHub Desktop.
Save jnugh/6338683 to your computer and use it in GitHub Desktop.
var wait = require('wait.for');
var testClass = function(){
};
testClass.staticMethod = function(){
console.log("call");
}
testClass.myMethod = function(){
this.staticMethod();
}
function test(){
testClass.myMethod();
try {
var res = wait.for(testClass.myMethod);
} catch(e) {
console.log('Test1:'+e);
}
try {
var res2 = wait.forMethod(testClass, 'myMethod');
} catch (e) {
console.log('Test2:'+e);
}
}
wait.launchFiber(test);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment