Created
August 26, 2013 06:54
-
-
Save jnugh/6338683 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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