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

Add explicit path to authorization/index.js to fix imports within Jest environments #160

Merged
merged 2 commits into from
Oct 14, 2017

Conversation

wehriam
Copy link
Contributor

@wehriam wehriam commented Oct 10, 2017

Requiring node-oidc-provider in Jest 20+ fails because /lib/actions/authorization/index.js does not resolve correctly.

This change fixes the issue with the Jest 20+ resolver. See https://github.com/jsonnull/jest-directory-named-resolver for a custom Jest resolver that also addresses the issue.

All tests pass.

@codecov-io
Copy link

codecov-io commented Oct 10, 2017

Codecov Report

Merging #160 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #160   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          98     97    -1     
  Lines        2438   2437    -1     
=====================================
- Hits         2438   2437    -1
Impacted Files Coverage Δ
lib/actions/grants/client_credentials.js 100% <ø> (ø)
lib/actions/grants/refresh_token.js 100% <ø> (ø)
lib/actions/grants/authorization_code.js 100% <ø> (ø)
lib/helpers/initialize_app.js 100% <100%> (ø) ⬆️
lib/actions/authorization/index.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 102439a...8ea9e2c. Read the comment docs.

@panva
Copy link
Owner

panva commented Oct 10, 2017

Could you please point me to the relevant jest issue? I don't understand why this is necessary.

@wehriam
Copy link
Contributor Author

wehriam commented Oct 10, 2017

I'm not aware of a Jest issue associated with this behavior.

I'm also not sure if this is the expected behavior of the default Jest resolver.

Possibly related:

@panva
Copy link
Owner

panva commented Oct 12, 2017

my OCD for uniform code style can't stand this change :) How about what i just pushed, does that solve the jest issue for you?

@panva panva force-pushed the fix/jest-resolver-compatibility branch from 1798c2b to 8ea9e2c Compare October 14, 2017 13:36
@panva panva merged commit 3a91c4b into panva:master Oct 14, 2017
@github-actions github-actions bot locked and limited conversation to collaborators Apr 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants