do all the endpoints that have POST also require OPTIONS?
maybe I am missing a decorator?
alastairp
that's a great question
there is a set of "standard headers", and if your request only uses those ones, you don't need to do OPTIONS.
however, I believe we set the content-type header to application/json, which is "non-standard", so the answer to your question is probably "yes, you are missing a decorator"
sumedh has quit
ruaok
I have `@crossdomain(headers="Authorization, Content-Type")` but not method OPTIONS.
I guess that the decorator doesn't add the OPTIONS method.
alastairp
yeah, I think this is the same thing we ran into in the dataset hoster, too
yes, we had to add method OPTIONS
you're right, it could be interesting to see if we can modify that decorator to insert the method if it's not there. would that be too much magic?
do you know how node testing tools report failures to upstream tools? in pytest we can output 'junit format' log files, which jenkins can read and display nicely
I don't know if something like that is set up already
_lucifer
alastairp: the changes look fine to me. regarding the no-self check, how about we disable that for only the specific test class/file ?
alastairp
_lucifer: mmm, sure. I'm not really convinced either way though
Mr_Monkey
To be honest, I don't know more than you do.
alastairp
especially given that we don't really use classes anywhere else in CB
Mr_Monkey: ok, no problem. when I look at it in more detail I'll poke you if I need any js help
Mr_Monkey
Sure thing
_lucifer
alastairp: my thinking is that we should have such checks in production code but may disable for tests as desired.
alastairp
_lucifer: ok, sure. you've convinced me
Mr_Monkey
alastairp: After a quick look, it does look like `jest --reporters="jest-junit"` is indeed what you need
alastairp
and that'll write a file somewhere?
Mr_Monkey
Yep. There's options you can pass (or with env variables) to control where
`JEST_JUNIT_OUTPUT_DIR`
etc;
alastairp
perfect
I'm looking at format:ci and type-check. There is a warning messages parser for 'jslint', but we're using 'eslint'. Do you know if their output is the same?
I need to see if it will deal with tsc output too. Will look into it later