Skip to content

Commit 7ab52b7

Browse files
oleersoyRyanZim
authored andcommitted
Add tests for importing sub-files/directories from npm packages (#337)
1 parent df611c2 commit 7ab52b7

File tree

5 files changed

+14
-0
lines changed

5 files changed

+14
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@import "modularized-css/foo";
2+
@import "modularized-css/foo/boo/boomod.css";
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.i-pity-the-foo{}
2+
.i-pity-the-boo{}

test/node_modules/modularized-css/foo/boo/boomod.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/node_modules/modularized-css/foo/index.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/resolve.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@ test(
5151
{ from: "test/fixtures/imports/foo.css" }
5252
)
5353

54+
test(
55+
"should be able to consume npm sub packages",
56+
checkFixture,
57+
"resolve-npm-subpackages",
58+
{ path: null },
59+
{ from: "test/fixtures/imports/foo.css" }
60+
)
61+
5462
test(
5563
"should be able to consume modules from custom modules directories",
5664
checkFixture,

0 commit comments

Comments
 (0)