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

npm ignoring tests means npm run unorm test doesn't work #25

Open
ljharb opened this issue Jun 30, 2014 · 4 comments
Open

npm ignoring tests means npm run unorm test doesn't work #25

ljharb opened this issue Jun 30, 2014 · 4 comments

Comments

@ljharb
Copy link

ljharb commented Jun 30, 2014

I'd like to include unorm in a module, and use npm run unorm test to run the tests, but none of the tests are included in npm.

@phadej
Copy link
Collaborator

phadej commented Jun 30, 2014

Shortly, why?

We omit tests from published package, as they are development-related code. And Travis makes sure that we never release broken package.

@ljharb
Copy link
Author

ljharb commented Jul 2, 2014

My module will combine multiple shim modules, including unorm - globals will be modified, and I want to make sure that unorm's tests aren't broken by another module's global changes.

The only way I can avoid running unorm's tests via npm, is by duplicating them myself.

@phadej
Copy link
Collaborator

phadej commented Jul 2, 2014

That one is very exoteric usage need. I'd like keep package size small for every user.

You could pull this repository as submodule if you need the tests from here.

AFAIK you have to monkey patch test suite anyway, as unorm's test-suite uses local instance of unorm - there aren't other packages messing up with globals. Or did I get it wrong?

@walling What you think about this?

@ljharb
Copy link
Author

ljharb commented Jul 2, 2014

It's typical for npm modules to include their tests. Reducing package size is the job of a deploy process, not npm.

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

2 participants