std/expect/_serializer.ts
eryue0220 e7c6d36abf
fix(expect): support expect.addSnapshotSerializer (#6173)
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2024-11-06 12:51:50 +09:00

16 lines
402 B
TypeScript

// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
import type { SnapshotPlugin } from "./_types.ts";
const INTERNAL_PLUGINS: SnapshotPlugin[] = [
// TODO(eryue0220): support internal snapshot serializer plugins
];
export function addSerializer(plugin: SnapshotPlugin) {
INTERNAL_PLUGINS.unshift(plugin);
}
export function getSerializer() {
return INTERNAL_PLUGINS;
}