usage with steno
danprince opened this issue · comments
It'd be great to be able to use this package with Steno (Slack's API scenario recording tool).
The basic workflow is to run Steno then start sending API requests to the local port that it's running on, allowing it to log them and forward them on to Slack.
The only thing which prevents this at the moment is that the URL is hardcoded into _exec.js
.
Could allow overriding that URL with an environment variable? But I guess that's not going to help browser users much.
Could also accept an overridden URL through the method params like tokens are.
Happy to open up a PR if you know how you'd like to see this implemented.
Yes, this is a great idea and keeping aligned with Slack ecosystem tooling is an important goal.
I hesitate to change the methods signature for this particular use case. But I really like env vars to know if we are in a testing state. If we use NODE_ENV=testing
this will be a seamless experience for most Node based projects.
Means we would need a special browser build for testing code. Could use envify for that which should be pretty easy. I’ve been intending to publish standalone browser builds but haven’t gotten around to it. Something like:
slack-9.0.0.js
slack-9.0.0.min.js
slack-testing-9.0.0.js
slack-testing-9.0.0.min.js
PR would be super appreciated!
💯 💕