Skip to content

Commit 62a615d

Browse files
authored
Update test.ts for Deno 2
Based on cmorten#45
1 parent d829dfd commit 62a615d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/test.ts

+3-4
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ type Parser = (str: string) => any;
4747
type MultipartValueSingle =
4848
| Blob
4949
| Uint8Array
50-
| Deno.Reader
5150
| string
5251
| boolean
5352
| number;
@@ -189,7 +188,7 @@ exposeSham(SHAM_SYMBOL);
189188
async function completeXhrPromises() {
190189
for (
191190
const promise of Object.values(
192-
(window as any)[SHAM_SYMBOL].promises,
191+
(globalThis as any)[SHAM_SYMBOL].promises,
193192
)
194193
) {
195194
if (promise) {
@@ -221,7 +220,7 @@ export class Test extends SuperRequest {
221220
#urlSetupPromise: Promise<void>;
222221

223222
public app: string | ListenerLike | ServerLike;
224-
public url!: string;
223+
public override url!: string;
225224

226225
constructor(
227226
app: string | ListenerLike | ServerLike,
@@ -536,7 +535,7 @@ export class Test extends SuperRequest {
536535
* @returns {Test} for chaining
537536
* @public
538537
*/
539-
end(callback?: CallbackHandler): this {
538+
override end(callback?: CallbackHandler): this {
540539
Promise.allSettled([this.#serverSetupPromise, this.#urlSetupPromise]).then(
541540
() => {
542541
const self = this;

0 commit comments

Comments
 (0)