Fork me on GitHub
#testing
<
2016-07-01
>
bensu04:07:17

@blance what are you using to make your http requests?

blance16:07:57

@bensu: bensu cljs-http

bensu16:07:41

@blance: what I've done in that case is to create a component called MyService which represents the service you are calling with http. That component has a number of protocols which represent the requests I'll be making in production

bensu16:07:28

during testing, I pass another component: MyMockService which implements the same functions but returns the test data instead of making the http requests

blance16:07:14

or just regular namespace?

bensu16:07:29

I mean stuartsierra/component. it could be any record but component lets you create complete test/production systems where you don't need to worry about (if production? ...) like logic

blance16:07:39

oh cool. I only heard about it but haven't used it before. I'll take a loot at it.

blance16:07:42

Thanks alot!

jjcomer17:07:44

I’m looking at starting to use expectations, is there a way to output the test results as a junit test or as TAP? I would like to feed the output into my Jenkins build