Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jun 20, 2023. It is now read-only.

Commit d4f26fd

Browse files
bendersejnchanged
authored andcommitted
feat: add test for scope packages with valid name
1 parent 3e2bf8e commit d4f26fd

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

src/quantum/tests/OptimisedBundle.test.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export class FlatAPItest {
102102
}
103103

104104
"Should bundle a partial require on a scoped repository"() {
105-
// gets a module from src/tests/stubs/test_modules/fbjs
105+
// gets a module from src/tests/stubs/test_modules/@bar
106106
return createOptimisedBundleEnv({
107107
stubs: true,
108108
project: {
@@ -117,4 +117,20 @@ export class FlatAPItest {
117117
should(first).deepEqual({ something: { hello: '@bar/animations/browser' } })
118118
});
119119
}
120+
121+
"Should bundle a partial require on a scoped (with valid naming) repository"() {
122+
// gets a module from src/tests/stubs/test_modules/@bar.foo
123+
return createOptimisedBundleEnv({
124+
stubs: true,
125+
project: {
126+
files: {
127+
"index.js": `exports.something = require("@bar.foo/animations/browser")`
128+
},
129+
instructions: "index.js",
130+
},
131+
}).then((result) => {
132+
const first = result.window.$fsx.r(0);
133+
should(first).deepEqual({ something: { hello: '@bar/animations/browser' } })
134+
});
135+
}
120136
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = { hello: "@bar/animations/browser" }

0 commit comments

Comments
 (0)