aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/test/expect.zig
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-07-18 02:07:41 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-07-18 02:07:41 -0700
commitdf0db54c58008d2a61a0c515a8611a231ae1d541 (patch)
treed98650c81c7b71c3f1b6116319a1d72d513ae3da /src/bun.js/test/expect.zig
parent0fd493fd781cfaaa704f08751f4239dd36ec5492 (diff)
parent661355546a4658ea927bfd70698577c1db301243 (diff)
downloadbun-df0db54c58008d2a61a0c515a8611a231ae1d541.tar.gz
bun-df0db54c58008d2a61a0c515a8611a231ae1d541.tar.zst
bun-df0db54c58008d2a61a0c515a8611a231ae1d541.zip
Merge branch 'main' into jarred/brotli
Diffstat (limited to 'src/bun.js/test/expect.zig')
-rw-r--r--src/bun.js/test/expect.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bun.js/test/expect.zig b/src/bun.js/test/expect.zig
index 12f7011fb..e7209e683 100644
--- a/src/bun.js/test/expect.zig
+++ b/src/bun.js/test/expect.zig
@@ -117,7 +117,7 @@ pub const Expect = struct {
const now = std.time.Instant.now() catch unreachable;
const pending_test = Jest.runner.?.pending_test.?;
const elapsed = @divFloor(now.since(pending_test.started_at), std.time.ns_per_ms);
- const remaining = @truncate(u32, Jest.runner.?.last_test_timeout_timer_duration -| elapsed);
+ const remaining = @as(u32, @truncate(Jest.runner.?.last_test_timeout_timer_duration -| elapsed));
if (!globalThis.bunVM().waitForPromiseWithTimeout(promise, remaining)) {
pending_test.timeout();
@@ -2139,7 +2139,7 @@ pub const Expect = struct {
active_test_expectation_counter.actual += 1;
const not = this.flags.not;
- var pass = value.jsType().isArray() and @intCast(i32, value.getLength(globalThis)) == size.toInt32();
+ var pass = value.jsType().isArray() and @as(i32, @intCast(value.getLength(globalThis))) == size.toInt32();
if (not) pass = !pass;
if (pass) return thisValue;
@@ -3003,7 +3003,7 @@ pub const Expect = struct {
const times = arguments[0].coerce(i32, globalObject);
- var pass = @intCast(i32, calls.getLength(globalObject)) == times;
+ var pass = @as(i32, @intCast(calls.getLength(globalObject))) == times;
const not = this.flags.not;
if (not) pass = !pass;