Closed marzelin closed 7 years ago
Thanks for this @marzelin.
What do you think about adding a unit test for this too?
@simonsmith is there a way to test this behavior without pulling down some css library?
Yeah, if you test the resolveGlob
function directly you can avoid all the postcss
plugin stuff. Some of the existing tests should give you an idea - https://github.com/marzelin/postcss-easy-import/blob/7de8b90c0b6d5274653a0aa8a08320b83a5ba178/test/resolve-glob.js
Does that help?
@marzelin You may just add node_modules dir in test fixtures
Tests added, but they will break if you upgrade ava since they changed how the current working directory in test files is calculated.
Yeah, I had trouble upgrading ava
before so I've left it for now. This looks good to me. @TrySound?
Yep. lgtm I like jest now, if you don't want to use ava.
I like jest now, if you don't want to use ava
Same! Perhaps that can be a separate chore task
@marzelin Thanks very much for this! Merging.
Released in 2.1.0
For non-relative globs, glob resolver looks for files also in
node_modules
andweb_modules
Closes #15