dthree / wat

Instant, central, community-built docs
MIT License
495 stars 25 forks source link

"err wrong command" on correct command #21

Closed Qix- closed 9 years ago

Qix- commented 9 years ago
screen shot 2015-10-06 at 02 16 33

So this happened. Got Err... wrong command when the comment was corrected.

dthree commented 9 years ago

lol you typed js arrya slice.

Wat was smart enough to auto-correct it, but my Tour code wasn't:

  tour.step(1)
    .begin(start1)
    .expect("command", function (data, cb) {
      cb(data.command === 'js array slice');
    })
    .reject('Err.. wrong command.')
    .wait(1000)
    .end(end1)

Fixed it to be more lenient.

(That "Er... Wrong Command" was the Tour talking)

dthree commented 9 years ago

Published the fix :)