Skip to content

run() got executed twice? #12

@cxyokk

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?

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