aboutsummaryrefslogtreecommitdiff
path: root/test/bun.js/bun-jsc.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/bun.js/bun-jsc.test.js')
-rw-r--r--test/bun.js/bun-jsc.test.js108
1 files changed, 0 insertions, 108 deletions
diff --git a/test/bun.js/bun-jsc.test.js b/test/bun.js/bun-jsc.test.js
deleted file mode 100644
index 6e6897eb3..000000000
--- a/test/bun.js/bun-jsc.test.js
+++ /dev/null
@@ -1,108 +0,0 @@
-import { describe, expect, it } from "bun:test";
-import {
- describe as jscDescribe,
- describeArray,
- gcAndSweep,
- fullGC,
- edenGC,
- heapSize,
- heapStats,
- memoryUsage,
- getRandomSeed,
- setRandomSeed,
- isRope,
- callerSourceOrigin,
- noFTL,
- noOSRExitFuzzing,
- optimizeNextInvocation,
- numberOfDFGCompiles,
- releaseWeakRefs,
- totalCompileTime,
- getProtectedObjects,
- reoptimizationRetryCount,
- drainMicrotasks,
- startRemoteDebugger,
-} from "bun:jsc";
-
-describe("bun:jsc", () => {
- function count() {
- var j = 0;
- for (var i = 0; i < 999999; i++) {
- j += i + 2;
- }
-
- return j;
- }
-
- it("describe", () => {
- jscDescribe([]);
- });
- it("describeArray", () => {
- describeArray([1, 2, 3]);
- });
- it("gcAndSweep", () => {
- gcAndSweep();
- });
- it("fullGC", () => {
- fullGC();
- });
- it("edenGC", () => {
- edenGC();
- });
- it("heapSize", () => {
- expect(heapSize() > 0).toBe(true);
- });
- it("heapStats", () => {
- heapStats();
- });
- it("memoryUsage", () => {
- memoryUsage();
- });
- it("getRandomSeed", () => {
- getRandomSeed(2);
- });
- it("setRandomSeed", () => {
- setRandomSeed(2);
- });
- it("isRope", () => {
- expect(isRope("a" + 123 + "b")).toBe(true);
- expect(isRope("abcdefgh")).toBe(false);
- });
- it("callerSourceOrigin", () => {
- expect(callerSourceOrigin()).toBe(import.meta.url);
- });
- it("noFTL", () => {});
- it("noOSRExitFuzzing", () => {});
- it("optimizeNextInvocation", () => {
- count();
- optimizeNextInvocation(count);
- count();
- });
- it("numberOfDFGCompiles", () => {
- expect(numberOfDFGCompiles(count) > 0).toBe(true);
- });
- it("releaseWeakRefs", () => {
- releaseWeakRefs();
- });
- it("totalCompileTime", () => {
- totalCompileTime(count);
- });
- it("reoptimizationRetryCount", () => {
- reoptimizationRetryCount(count);
- });
- it("drainMicrotasks", () => {
- drainMicrotasks();
- });
- it("startRemoteDebugger", () => {
- // try {
- // startRemoteDebugger("");
- // } catch (e) {
- // if (process.platform !== "darwin") {
- // throw e;
- // }
- // }
- });
- it("getProtectedObjects", () => {
- expect(getProtectedObjects().length > 0).toBe(true);
- });
-});