Skip to content

Commit 1168412

Browse files
chore: Fix test failures caused by new TypeScript version
1 parent f47380e commit 1168412

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

testing/beforeEachFile.ts

+5
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ Navigator.prototype.clipboard.write = async (data: ClipboardItems): Promise<void
114114

115115
window.ClipboardItem ??= class {
116116
public readonly types: string[];
117+
public readonly presentationStyle = 'unspecified';
117118

118119
public constructor(
119120
public readonly items: Record<string, string | Blob | PromiseLike<string | Blob>>,
@@ -130,6 +131,10 @@ window.ClipboardItem ??= class {
130131
return value;
131132
}
132133
}
134+
135+
public static supports(type: string) {
136+
return type === 'text/plain' || type === 'text/html' || type.startsWith('image/');
137+
}
133138
};
134139

135140
window.ClipboardEvent ??= class extends Event {

0 commit comments

Comments
 (0)