Skip to content
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

update tests to work with env variables #9

Closed
sgnl opened this issue Jan 29, 2017 · 0 comments
Closed

update tests to work with env variables #9

sgnl opened this issue Jan 29, 2017 · 0 comments

Comments

@sgnl
Copy link
Owner

sgnl commented Jan 29, 2017

instead of having this hack:

  if (MockReq) {
    Req = MockReq
  }

and

    if (this.hasOwnProperty('MockSSDPClient')) {
      Client = new this.MockSSDPClient()
    } else {
      Client = new NodeSSDPClient()
    }
Glavin001 added a commit to Glavin001/nodeku that referenced this issue Oct 7, 2017
Production/real library code should not container test code.
Proxyquire is used to override dependencies during testing,
allowing mocking of dependencies when needed.
sgnl added a commit that referenced this issue Oct 8, 2017
Fix #9. Use proxyquire to remove test code from lib
@sgnl sgnl closed this as completed Oct 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant