Skellington-Closet / slack-mock

A Slack API mocker for Slack bot integration tests.
MIT License
64 stars 15 forks source link

Slash Command Register improvements #7

Closed colestrode closed 7 years ago

colestrode commented 7 years ago

nock scopes are only mocking the host, not the full url. Since we use "persist", this could cause issues since I believe Slack uses the same host for all slash commands (though I don't think it's safe to assume that). We will need to use nock for the host and keep track of mocked paths. Each incoming request should have it's path validated.

I believe nock will throw an error for unmatched mocks, we should probably wrap this and log an error.