Skip to content

Commit

Permalink
Add type to val and remove unused
Browse files Browse the repository at this point in the history
  • Loading branch information
leowrites committed Oct 19, 2024
1 parent ea0a515 commit 5ef7cf3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions memory-viz/src/plugins/pretty_svg.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import type { NewPlugin, OldPlugin } from "pretty-format";
// Custom pretty-format plugin for serializing SVG elements
// See https://github.com/jestjs/jest/tree/main/packages/pretty-format#writing-plugins for more information

import type { NewPlugin } from "pretty-format";
import pretty from "pretty";
import { parse } from "node-html-parser";
import { parse, HTMLElement } from "node-html-parser";

export const serialize: NewPlugin["serialize"] = (val) => {
export const serialize: NewPlugin["serialize"] = (val: HTMLElement) => {
return pretty(val);
};

Expand Down

0 comments on commit 5ef7cf3

Please sign in to comment.