Skip to content

Commit

Permalink
Fix CLI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrtenz committed Feb 1, 2024
1 parent 64f2a03 commit ec8cc03
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2031,7 +2031,7 @@ exports[`getDefaultConfiguration returns the default Webpack configuration for t
"exclude": /node_modules/u,
"test": /\\\\\\.\\[tj\\]sx\\?\\$/u,
"use": {
"loader": "/Users/morten/Development/MetaMask/snaps/packages/snaps-cli/src/webpack/loaders/function.ts",
"loader": "/foo/bar/src/webpack/loaders/function.ts",
"options": {
"bundlerCustomizer": undefined,
"depsToTranspile": [],
Expand Down Expand Up @@ -2166,7 +2166,7 @@ exports[`getDefaultConfiguration returns the default Webpack configuration for t
"exclude": /node_modules/u,
"test": /\\\\\\.\\[tj\\]sx\\?\\$/u,
"use": {
"loader": "/Users/morten/Development/MetaMask/snaps/packages/snaps-cli/src/webpack/loaders/function.ts",
"loader": "/foo/bar/src/webpack/loaders/function.ts",
"options": {
"bundlerCustomizer": undefined,
"depsToTranspile": [],
Expand Down Expand Up @@ -2301,7 +2301,7 @@ exports[`getDefaultConfiguration returns the default Webpack configuration for t
"exclude": /node_modules/u,
"test": /\\\\\\.\\[tj\\]sx\\?\\$/u,
"use": {
"loader": "/Users/morten/Development/MetaMask/snaps/packages/snaps-cli/src/webpack/loaders/function.ts",
"loader": "/foo/bar/src/webpack/loaders/function.ts",
"options": {
"bundlerCustomizer": undefined,
"depsToTranspile": [],
Expand Down
4 changes: 3 additions & 1 deletion packages/snaps-cli/src/webpack/config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,10 @@ describe('getDefaultConfiguration', () => {
async (config) => {
jest.spyOn(process, 'cwd').mockReturnValue('/foo/bar');

const output = await getDefaultConfiguration(config);

// eslint-disable-next-line jest/no-restricted-matchers
expect(await getDefaultConfiguration(config)).toMatchSnapshot();
expect(normalizeConfig(output)).toMatchSnapshot();
},
);

Expand Down
2 changes: 1 addition & 1 deletion packages/snaps-cli/src/webpack/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ export async function getDefaultConfiguration(

config.experimental.wasm && {
test: /\.wasm$/u,
use: getFunctionLoader(wasm),
use: getFunctionLoader(wasm, {}),
},
],
},
Expand Down

0 comments on commit ec8cc03

Please sign in to comment.