mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
* Move ReadFile and WriteFile to separate file * Use libuv for Bun.write() * Update windows_event_loop.zig * build * Get bun-write tests to pass. Implement Bun.write with two files. * UPdate * Update * Update failing test list * update * More * More * More * More * Mark the rest * ok * oops * Update bun-write.test.js * Update blob.zig --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Co-authored-by: Dave Caruso <me@paperdave.net> Co-authored-by: Georgijs Vilums <georgijs.vilums@gmail.com>
30 lines
1.1 KiB
TypeScript
30 lines
1.1 KiB
TypeScript
// GENERATED - DO NOT EDIT
|
|
// Copyright 2018+ the Deno authors. All rights reserved. MIT license.
|
|
// https://raw.githubusercontent.com/denoland/deno/main/cli/tests/unit/custom_event_test.ts
|
|
import { createDenoTest } from "deno:harness";
|
|
const { test, assertEquals } = createDenoTest(import.meta.path);
|
|
test(function customEventInitializedWithDetail() {
|
|
const type = "touchstart";
|
|
const detail = {
|
|
message: "hello"
|
|
};
|
|
const customEventInit = {
|
|
bubbles: true,
|
|
cancelable: true,
|
|
detail
|
|
} as CustomEventInit;
|
|
const event = new CustomEvent(type, customEventInit);
|
|
assertEquals(event.bubbles, true);
|
|
assertEquals(event.cancelable, true);
|
|
assertEquals(event.currentTarget, null);
|
|
assertEquals(event.detail, detail);
|
|
assertEquals(event.isTrusted, false);
|
|
assertEquals(event.target, null);
|
|
assertEquals(event.type, type);
|
|
});
|
|
test(function toStringShouldBeWebCompatibility() {
|
|
const type = "touchstart";
|
|
const event = new CustomEvent(type, {});
|
|
assertEquals(event.toString(), "[object CustomEvent]");
|
|
});
|