Skip to content

Commit

Permalink
fix: test due to resolver changes (codesandbox#8687)
Browse files Browse the repository at this point in the history
  • Loading branch information
CompuIves authored Jan 15, 2025
1 parent b0b2a77 commit 448c25b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions packages/sandpack-core/src/resolver/resolver.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ describe('resolve', () => {
isFile,
readFile,
});
expect(resolved).toBe('/node_modules/solid-js/dist/solid.cjs');
expect(resolved).toBe('/node_modules/solid-js/dist/solid.js');
});

it('should fall back to index.js when it cannot find package.main', () => {
Expand Down Expand Up @@ -535,7 +535,7 @@ describe('resolve', () => {
isFile,
readFile,
});
expect(resolved).toBe('/node_modules/its-fine/out/index.cjs');
expect(resolved).toBe('/node_modules/its-fine/out/index.js');
});

it('resolve fflate correctly', () => {
Expand All @@ -545,7 +545,7 @@ describe('resolve', () => {
isFile,
readFile,
});
expect(resolved).toBe('/node_modules/fflate/lib/index.cjs');
expect(resolved).toBe('/node_modules/fflate/esm/browser.js');
});

// We should still post process imports using the browser field even when a package has exports
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
exports[`process package.json Should correctly handle nested pkg#exports fields (solid-js) 1`] = `
{
"aliases": {
"/node_modules/solid-js": "/node_modules/solid-js/dist/solid.cjs",
"/node_modules/solid-js": "/node_modules/solid-js/dist/solid.js",
"/node_modules/solid-js/dist/*": "/node_modules/solid-js/dist/$1",
"/node_modules/solid-js/dist/server.cjs": "/node_modules/solid-js/dist/solid.cjs",
"/node_modules/solid-js/dist/server.js": "/node_modules/solid-js/dist/solid.js",
"/node_modules/solid-js/h": "/node_modules/solid-js/h/dist/h.cjs",
"/node_modules/solid-js/h": "/node_modules/solid-js/h/dist/h.js",
"/node_modules/solid-js/h/dist/*": "/node_modules/solid-js/h/dist/$1",
"/node_modules/solid-js/html": "/node_modules/solid-js/html/dist/html.cjs",
"/node_modules/solid-js/html": "/node_modules/solid-js/html/dist/html.js",
"/node_modules/solid-js/html/dist/*": "/node_modules/solid-js/html/dist/$1",
"/node_modules/solid-js/store": "/node_modules/solid-js/store/dist/store.cjs",
"/node_modules/solid-js/store": "/node_modules/solid-js/store/dist/store.js",
"/node_modules/solid-js/store/dist/*": "/node_modules/solid-js/store/dist/$1",
"/node_modules/solid-js/universal": "/node_modules/solid-js/universal/dist/dev.cjs",
"/node_modules/solid-js/universal": "/node_modules/solid-js/universal/dist/dev.js",
"/node_modules/solid-js/universal/dist/*": "/node_modules/solid-js/universal/dist/$1",
"/node_modules/solid-js/web": "/node_modules/solid-js/web/dist/web.cjs",
"/node_modules/solid-js/web": "/node_modules/solid-js/web/dist/web.js",
"/node_modules/solid-js/web/dist/*": "/node_modules/solid-js/web/dist/$1",
},
"hasExports": true,
Expand Down

0 comments on commit 448c25b

Please sign in to comment.