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

Use absolute import paths in test code #470

Open
kumar303 opened this issue Sep 7, 2016 · 5 comments
Open

Use absolute import paths in test code #470

kumar303 opened this issue Sep 7, 2016 · 5 comments

Comments

@kumar303
Copy link
Contributor

kumar303 commented Sep 7, 2016

The test code has some gnarly imports for local library files like:

import build from '../../../src/cmd/build'

We should fix this so it can be:

import build from 'cmd/build'

We fixed this in addons-frontend by using better-npm-run and setting NODE_PATH for each command.

@kumar303
Copy link
Contributor Author

I'm nominating this as a good first bug because there is a clear example (linked above) to show how to do it.

@lavish205
Copy link

@kumar303 I'm new to web-ext and I would love to work on this bug.

@kumar303
Copy link
Contributor Author

Hi @lavish205 and welcome! Let me know if you have any questions.

@lavish205
Copy link

I'm confused how to proceed with it. Can you please provide more details so that I can start working on it.

@kumar303
Copy link
Contributor Author

I took a closer look at this and actually I don't think it's a good first bug to work on. The problem that I found is that all of the test code needs to be put in subdirectory, like tests/testlib/ so that we can more safely add it to the NODE_PATH for importing. This is a complicated change to get right because it involves updating some obscure webpack and karma configs.

Sorry about the confusion. I would suggest taking a look at what else may interest you under the good first bug label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants