mirror of
https://github.com/morluto/rea.git
synced 2026-11-07 07:16:13 +00:00
1 parent
e966b9f9a5
commit
9b598076e3
3 files changed
+74
-5
No files matched your search
@@ -160,6 +160,19 @@ it("retains a mutated require.resolve request as an unknown fact", () => {
|
||||
).toEqual([expect.objectContaining({ kind: "require", specifier: null })]);
|
||||
});
|
||||
|
||||
it("does not treat bundler factory resolve members as Node resolvers", () => {
|
||||
const analysis = analyzeJavaScriptStaticSource(`
|
||||
globalThis.webpackChunkApp.push([[1], {
|
||||
"factory": function (module, exports, loader) {
|
||||
loader.resolve("./not-a-dependency.cjs");
|
||||
}
|
||||
}]);
|
||||
`);
|
||||
expect(analysis.references.filter(({ kind }) => kind === "require")).toEqual(
|
||||
[],
|
||||
);
|
||||
});
|
||||
|
||||
it.each([
|
||||
[
|
||||
"captured wrapper",
|
||||
|
||||
Reference in new issue
Block a user