Skip to content

run() got executed twice? #12

Description

@cxyokk

So i clone the repo, and edit the example echo.js like this:

nexpect.spawn("echo", ["xxx"]) // echo something wrong
       .expect("hello")        // this should fail
       .run(function (err) {
          console.log(arguments); // here
          if (!err) {
            console.log("hello was echoed");
          }
       });

However i still got hello was echoed. The output is:

{ '0': [Error: xxx was not expected..] }
{ '0': null, '1': [ 'xxx' ], '2': 0 }
hello was echoed

This is wrong, right?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions