Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tests #201

Merged
merged 2 commits into from Apr 11, 2020
Merged

Fix tests #201

merged 2 commits into from Apr 11, 2020

Conversation

blag
Copy link
Contributor

@blag blag commented Apr 10, 2020

For PR #200 it looked like the build passed. But looking at the individual jobs:

...
  141 passing (482ms)
  5 failing
  1) SparkFormatter
       should normalize the addressee:
     AssertionError: expected undefined to be a string
      at Context.<anonymous> (test/test-formatdata.js:406:26)
  
  2) spark post data
       should post to room and mention a user:
     AssertionError: expected messageRoom to have been called with arguments { channel: "#stackstorm", extra: undefined }, stanley: normal boring text
{ extra: undefined, id: "#stackstorm", name: "stanley", roomId: "#stackstorm" } { channel: "#stackstorm", extra: undefined } 
stanley: normal boring text
      at Context.<anonymous> (test/test-postdata.js:903:44)
  
  3) spark post data
       should post to room and not mention a user:
     AssertionError: expected messageRoom to have been called with arguments { channel: "#stackstorm", extra: undefined }, normal boring text
{ extra: undefined, id: "#stackstorm", name: undefined, roomId: "#stackstorm" } { channel: "#stackstorm", extra: undefined } 
normal boring text
      at Context.<anonymous> (test/test-postdata.js:923:44)
  
  4) spark post data
       should post to room with extra:
     AssertionError: expected messageRoom to have been called with arguments { channel: "#stackstorm", extra: { custom1: "attribute1", custom2: "attribute2" } }, stanley: normal boring text
{
  extra: { custom1: "attribute1", custom2: "attribute2" },
  id: "#stackstorm",
  name: "stanley",
  roomId: "#stackstorm"
} { channel: "#stackstorm", extra: { custom1: "attribute1", custom2: "attribute2" } } 
stanley: normal boring text
      at Context.<anonymous> (test/test-postdata.js:948:44)
  
  5) spark post data
       should post message with pretext to room:
     AssertionError: expected messageRoom to have been called with arguments { channel: "#stackstorm", extra: undefined }, stanley: NORMAL PRETEXT
normal boring text
{ extra: undefined, id: "#stackstorm", name: "stanley", roomId: "#stackstorm" } { channel: "#stackstorm", extra: undefined } 
stanley: NORMAL PRETEXT
normal boring text
      at Context.<anonymous> (test/test-postdata.js:993:44)


---------------------|----------|----------|----------|----------|-------------------|
          .          |     .    |     .    |     .    |     .    |         .         |
          .          |     .    |     .    |     .    |     .    |         .         |
          .          |     .    |     .    |     .    |     .    |         .         |
---------------------|----------|----------|----------|----------|-------------------|

The command "npm test" exited with 0.
store build cache

Done. Your build exited with 0.

This is due to a bug that has been reported multiple times to mocha:

This PR fixes this by passing the --exit flag to mocha. The first commit properly fails the Travis CI tests, and the second commit fixes the tests to match the changes in PR #200, which were tested against a real instance of Cisco Spark/Webex.

Using the --exit flag isn't exactly meant to solve this problem, but it does.

@nmaludy nmaludy merged commit ef3f96f into master Apr 11, 2020
@blag blag deleted the fix-tests branch April 11, 2020 04:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants