aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/bindings/ZigGlobalObject.h
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2023-06-09 16:38:06 -0700
committerGravatar GitHub <noreply@github.com> 2023-06-09 16:38:06 -0700
commitbf518222d456c913fc5e6b6e0d14952d76c0ce91 (patch)
tree99431a14fefb1b52b75ea0528b68232e8af2cb7c /src/bun.js/bindings/ZigGlobalObject.h
parent6565bd89d533b17d0d975f2790a4b4d37d8aecc1 (diff)
downloadbun-bf518222d456c913fc5e6b6e0d14952d76c0ce91.tar.gz
bun-bf518222d456c913fc5e6b6e0d14952d76c0ce91.tar.zst
bun-bf518222d456c913fc5e6b6e0d14952d76c0ce91.zip
Implement mocks in bun:test (#3252)
* wip * wip * most of the code for mocks in bun:test * finishing up * Implement `toHaveBeenCalled` and `toHaveBeenCalledTimes(1)` * Test * visit * results, not returnValues * exact * Update jest.zig * A couple more tests * Add jest.fn * support resetting mocks * Implement spyOn --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Diffstat (limited to 'src/bun.js/bindings/ZigGlobalObject.h')
-rw-r--r--src/bun.js/bindings/ZigGlobalObject.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bun.js/bindings/ZigGlobalObject.h b/src/bun.js/bindings/ZigGlobalObject.h
index dbafa1a93..3cf88bf29 100644
--- a/src/bun.js/bindings/ZigGlobalObject.h
+++ b/src/bun.js/bindings/ZigGlobalObject.h
@@ -41,6 +41,7 @@ class DOMWrapperWorld;
#include "DOMConstructors.h"
#include "BunPlugin.h"
+#include "JSMockFunction.h"
namespace WebCore {
class SubtleCrypto;
@@ -405,6 +406,8 @@ public:
void* napiInstanceDataFinalizer = nullptr;
void* napiInstanceDataFinalizerHint = nullptr;
+ Bun::JSMockModule mockModule;
+
#include "ZigGeneratedClasses+lazyStructureHeader.h"
private: