aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/bun-types/bun-test.d.ts10
-rw-r--r--src/bun.js/bindings/bindings.cpp13
2 files changed, 10 insertions, 13 deletions
diff --git a/packages/bun-types/bun-test.d.ts b/packages/bun-types/bun-test.d.ts
index acd06bb72..c3ba00cd5 100644
--- a/packages/bun-types/bun-test.d.ts
+++ b/packages/bun-types/bun-test.d.ts
@@ -33,8 +33,18 @@ declare module "bun:test" {
export function beforeEach(fn: () => void): void;
interface Expect {
+ not: Expect;
toBe(value: any): void;
toContain(value: any): void;
+ toEqual(value: any): void;
+ toBeLength(value: number): void;
+ toHaveProperty(key: string, value?: any): void;
+ toBeTruthy(): void;
+ toBeFalsy(): void;
+ toBeDefined(): void;
+ toBeUndefined(): void;
+ toBeNaN(): void;
+ toBeNull(): void;
}
}
diff --git a/src/bun.js/bindings/bindings.cpp b/src/bun.js/bindings/bindings.cpp
index 955971ec0..e2e42f38c 100644
--- a/src/bun.js/bindings/bindings.cpp
+++ b/src/bun.js/bindings/bindings.cpp
@@ -152,7 +152,6 @@ static bool canPerformFastPropertyEnumerationForIterationBun(Structure* s)
return true;
}
-// adapted from underscorejs [https://underscorejs.org/docs/modules/isEqual.html]
bool Bun__deepEquals(JSC__JSGlobalObject* globalObject, JSValue v1, JSValue v2, Vector<std::pair<JSC::JSValue, JSC::JSValue>, 16>& stack, ThrowScope* scope, bool addToStack)
{
VM& vm = globalObject->vm();
@@ -1382,7 +1381,6 @@ void JSC__JSString__toZigString(JSC__JSString* arg0, JSC__JSGlobalObject* arg1,
*arg2 = Zig::toZigString(arg0->value(arg1));
}
-
bool JSC__JSString__eql(const JSC__JSString* arg0, JSC__JSGlobalObject* obj, JSC__JSString* arg2)
{
return arg0->equal(obj, arg2);
@@ -1394,8 +1392,6 @@ JSC__JSObject* JSC__JSString__toObject(JSC__JSString* arg0, JSC__JSGlobalObject*
return arg0->toObject(arg1);
}
-
-
#pragma mark - JSC::JSModuleLoader
// JSC__JSValue
@@ -1414,7 +1410,6 @@ void Microtask__run_default(void* microtask, void* global)
reinterpret_cast<Zig::JSMicrotaskCallbackDefaultGlobal*>(microtask)->call(reinterpret_cast<Zig::GlobalObject*>(global));
}
-
JSC__JSValue JSC__JSModuleLoader__evaluate(JSC__JSGlobalObject* globalObject, const unsigned char* arg1,
size_t arg2, const unsigned char* originUrlPtr, size_t originURLLen, const unsigned char* referrerUrlPtr, size_t referrerUrlLen,
JSC__JSValue JSValue5, JSC__JSValue* arg6)
@@ -2037,8 +2032,6 @@ bool JSC__JSInternalPromise__isHandled(const JSC__JSInternalPromise* arg0, JSC__
return arg0->isHandled(reinterpret_cast<JSC::VM&>(arg1));
}
-
-
#pragma mark - JSC::JSGlobalObject
JSC__JSValue JSC__JSGlobalObject__generateHeapSnapshot(JSC__JSGlobalObject* globalObject)
@@ -2550,7 +2543,6 @@ JSC__JSObject* JSC__JSValue__toObject(JSC__JSValue JSValue0, JSC__JSGlobalObject
return value.toObject(arg1);
}
-
JSC__JSString* JSC__JSValue__toString(JSC__JSValue JSValue0, JSC__JSGlobalObject* arg1)
{
JSC::JSValue value = JSC::JSValue::decode(JSValue0);
@@ -2562,7 +2554,6 @@ JSC__JSString* JSC__JSValue__toStringOrNull(JSC__JSValue JSValue0, JSC__JSGlobal
return value.toStringOrNull(arg1);
}
-
static void populateStackFrameMetadata(JSC::VM& vm, const JSC::StackFrame* stackFrame, ZigStackFrame* frame)
{
frame->source_url = Zig::toZigString(stackFrame->sourceURL(vm));
@@ -3058,7 +3049,6 @@ void JSC__Exception__getStackTrace(JSC__Exception* arg0, ZigStackTrace* trace)
populateStackTrace(arg0->vm(), arg0->stack(), trace);
}
-
#pragma mark - JSC::VM
JSC__JSValue JSC__VM__runGC(JSC__VM* vm, bool sync)
@@ -3193,9 +3183,6 @@ bJSC__CatchScope JSC__CatchScope__declare(JSC__VM* arg0, unsigned char* arg1, un
}
JSC__Exception* JSC__CatchScope__exception(JSC__CatchScope* arg0) { return arg0->exception(); }
-
-
-
JSC__JSValue JSC__JSPromise__rejectedPromiseValue(JSC__JSGlobalObject* arg0,
JSC__JSValue JSValue1)
{