Skip to content

Commit

Permalink
test(metro-config): fix Middleware sometimes being inferred as `Sim…
Browse files Browse the repository at this point in the history
…pleHandleFunction` (#3247)
  • Loading branch information
tido64 authored Jul 27, 2024
1 parent 975eccf commit 0639b2c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .changeset/six-needles-shave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
4 changes: 2 additions & 2 deletions packages/metro-config/test/assetPluginForMonorepos.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { IncomingMessage, ServerResponse } from "http";
import type { AssetData } from "metro";
import type { Middleware } from "metro-config";
import type Server from "metro/src/Server";
import { equal } from "node:assert/strict";
import type { IncomingMessage, ServerResponse } from "node:http";
import { describe, it } from "node:test";

describe("@rnx-kit/metro-config/assetPluginForMonorepos", () => {
Expand All @@ -27,7 +27,7 @@ describe("@rnx-kit/metro-config/assetPluginForMonorepos", () => {
it("unescapes `..` in URLs", () => {
Object.entries(cases).forEach(([output, input]) => {
const middleware: Middleware = (req: Middleware) => {
equal(req.url, output);
equal("url" in req && req.url, output);
return middleware;
};
const server = {
Expand Down

0 comments on commit 0639b2c

Please sign in to comment.