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
Passing custom parameters to Reporters via JS API, logic from bin script to CoffeeScript #154
Conversation
usedFileReportersLength = usedFileReportersLength - 1 | ||
if process.env['DREDD_REST_TOKEN'] == undefined or process.env['DREDD_REST_SUITE'] == undefined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought this part was supposed to be moved and handled in apiary-reporter class
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And tested there :)
I'm sorry, but:
My 0,02$:
|
c64b569
to
0c8a7bc
Compare
@netmilk Understood most of the problems about "why is there console, why is there the Unfortunately, you can't simply mock Other option would be to use Why I chose |
Ok, thanks for the explanation. In my opinion it's not needed at all, because if you want to test behavior of |
@@ -16,9 +16,6 @@ packageConfig = require './../package.json' | |||
logger = require './logger' | |||
|
|||
|
|||
String::startsWith = (str) -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
ff0ecd5
to
f89620a
Compare
a33bf5a
to
cc8e90c
Compare
cc8e90c
to
46769f5
Compare
Passing custom parameters to Reporters via JS API, logic from bin script to CoffeeScript
logger.warn "Apiary reporter environment variable APIARY_API_KEY or APIARY_API_NAME not defined." | ||
@configuration.apiSuite ?= 'public' | ||
|
||
_get: (customProperty, envProperty, defaultVal) -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Get what? I prefer to name methods/functions based on what they are doing.
Because
clone
cannot cloneprocess.stdout
, custom configuration is passed toDredd
class as a second argument