Skip to content

Commit

Permalink
Fix spelling in server loader test
Browse files Browse the repository at this point in the history
  • Loading branch information
unstubbable committed Apr 17, 2023
1 parent c593348 commit 0b92a75
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/webpack-rsc/src/webpack-rsc-server-loader.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ const currentDirname = path.dirname(url.fileURLToPath(import.meta.url));

async function callLoader(
filename: string,
clientReferenceMap: ClientReferencesMap,
clientReferencesMap: ClientReferencesMap,
): Promise<string | Buffer> {
const input = await fs.readFile(path.resolve(currentDirname, filename));

return new Promise((resolve, reject) => {
const context: Partial<
webpack.LoaderContext<WebpackRscServerLoaderOptions>
> = {
getOptions: () => ({clientReferencesMap: clientReferenceMap}),
getOptions: () => ({clientReferencesMap}),
resourcePath: path.resolve(currentDirname, filename),
cacheable: jest.fn(),
callback: (error, content) => {
Expand All @@ -48,9 +48,9 @@ async function callLoader(

describe(`webpackRscServerLoader`, () => {
test(`keeps only the 'use client' directive, and exported functions that are transformed to client references`, async () => {
const clientReferenceMap: ClientReferencesMap = new Map();
const clientReferencesMap: ClientReferencesMap = new Map();
const filename = `__fixtures__/client-components.js`;
const output = await callLoader(filename, clientReferenceMap);
const output = await callLoader(filename, clientReferencesMap);

const idPrefix = path.relative(
process.cwd(),
Expand Down Expand Up @@ -78,9 +78,9 @@ export const ComponentC = {
});

test(`does not change modules without a 'use client' directive`, async () => {
const clientReferenceMap: ClientReferencesMap = new Map();
const clientReferencesMap: ClientReferencesMap = new Map();
const filename = `__fixtures__/server-component.js`;
const output = await callLoader(filename, clientReferenceMap);
const output = await callLoader(filename, clientReferencesMap);

expect(output).toEqual(
`
Expand Down

1 comment on commit 0b92a75

@vercel
Copy link

@vercel vercel bot commented on 0b92a75 Apr 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

mfng – ./

mfng.vercel.app
mfng-git-main-unstubbable.vercel.app
mfng-unstubbable.vercel.app

Please sign in to comment.