Add test for #183

This commit is contained in:
Sindre Sorhus 2023-06-10 11:43:41 +03:00
parent 7d468191f4
commit 9265e9072d

View file

@ -24,6 +24,8 @@ const {window} = new JSDOM();
const {document} = window;
const createDomElement = (element: string) => document.createElement(element);
const structuredClone = globalThis.structuredClone ?? (x => x);
type Test = {
assert: (...args: any[]) => void | never;
fixtures: unknown[];
@ -487,6 +489,9 @@ const types = new Map<string, Test>([
{x: 1},
Object.create(null),
new Object(), // eslint-disable-line no-new-object
structuredClone({x: 1}),
structuredClone(Object.create(null)),
structuredClone(new Object()), // eslint-disable-line no-new-object
],
typename: 'Object',
typeDescription: AssertionTypeDescription.plainObject,