Skip to content

Commit

Permalink
test: simplify an object copy (#466)
Browse files Browse the repository at this point in the history
  • Loading branch information
wydengyre authored Dec 25, 2024
1 parent c21265f commit d5bbea7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/cf/worker.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ async function rssFeedSuccess() {
const feed = await resp.text();
const parsedFeed = parseFeed(feed);

const expectedJsonCopy = JSON.parse(
JSON.stringify(expectedJson),
) as typeof expectedJson;
const expectedJsonCopy = { ...expectedJson };
expectedJsonCopy.meta.imageURL = expectedJsonCopy.meta.imageURL.replace(
"RAI_SERVER_PORT",
servers.raiServerPort.toString(10),
Expand Down

0 comments on commit d5bbea7

Please sign in to comment.