How to use job-dependencies in tests
Issue #101
resolved
I'm using the "experimentalConfluence"-API located in atlasboard/lib/job-dependencies and it works fine. I wonder if it is possible to use this dependency in an integration test, since dependencies are not injected automatically in tests and I can not simply require it.
Is there a chance to di this?
Comments (5)
-
-
reporter Thanks, but the point ist that I'd like to use this dependency as it is in job-dependencies, not to mock anything. We do some real-system-integration-testing when we update the Confluence version to check if API calls are still valid, so mocking is not an option here.
-
Not sure how are you running your integration tests. Maybe if you post some code I can give you some directions.
-
reporter ok, I ended up using
var ical = dependencies.ical || require('ical');
So I consider this done.
-
reporter - changed status to resolved
- Log in to comment
You can just mock the dependencies:
and they write the job test: