aboutsummaryrefslogtreecommitdiff
path: root/integration/bunjs-only-snippets/bun-jsc.test.js
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-06-22 23:21:48 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-06-22 23:21:48 -0700
commit729d445b6885f69dd2c6355f38707bd42851c791 (patch)
treef87a7c408929ea3f57bbb7ace380cf869da83c0e /integration/bunjs-only-snippets/bun-jsc.test.js
parent25f820c6bf1d8ec6d444ef579cc036b8c0607b75 (diff)
downloadbun-jarred/rename.tar.gz
bun-jarred/rename.tar.zst
bun-jarred/rename.zip
change the directory structurejarred/rename
Diffstat (limited to 'integration/bunjs-only-snippets/bun-jsc.test.js')
-rw-r--r--integration/bunjs-only-snippets/bun-jsc.test.js94
1 files changed, 0 insertions, 94 deletions
diff --git a/integration/bunjs-only-snippets/bun-jsc.test.js b/integration/bunjs-only-snippets/bun-jsc.test.js
deleted file mode 100644
index 975003b77..000000000
--- a/integration/bunjs-only-snippets/bun-jsc.test.js
+++ /dev/null
@@ -1,94 +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,
- reoptimizationRetryCount,
- drainMicrotasks,
-} 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();
- });
-});