Test with jasmine readline javascript

49 views
Skip to first unread message

John Moon

unread,
Mar 20, 2014, 9:57:20 AM3/20/14
to jasmi...@googlegroups.com
I'm new to jasmine (from rspec) and I'm trying to test the move method that asks for users input. The user input will be passed to another method later on, but I want to get this part working before I move forward.

 move:function() {
    print("Enter number between 1 - 9");
    var userInput = readline();
 } 

I'm getting a ReferenceError: readline is not defined

It works as I expect on the command line, but it returns this error.
Reply all
Reply to author
Forward
0 new messages