// Generated by ReScript, PLEASE EDIT WITH CARE

import * as Mocha from "mocha";
import * as Test_utils from "./test_utils.mjs";

let keys = (function (x){return Object.keys(x)});

function $$higher_order(x){
   return function(y,z){
      return x + y + z
   }
  }
;

let int_config = {
  hi: 3,
  low: 32
};

let string_config = {
  hi: 3,
  low: "32"
};

function vv(z) {
  return z.hh();
}

function v(z) {
  return z.ff();
}

function vvv(z) {
  return z.ff_pipe();
}

function vvvv(z) {
  return z.ff_pipe2();
}

function create_prim() {
  return {
    "x'": 3,
    "x''": 3,
    "x''''": 2
  };
}

Mocha.describe("Ffi_js_test", () => {
  Mocha.test("higher_order function", () => Test_utils.eq("File \"ffi_js_test.res\", line 58, characters 41-48", 6, $$higher_order(1)(2, 3)));
  Mocha.test("config objects", () => {
    Test_utils.eq("File \"ffi_js_test.res\", line 65, characters 7-14", Object.keys(int_config).length, 2);
    Test_utils.eq("File \"ffi_js_test.res\", line 66, characters 7-14", Object.keys(string_config).length, 2);
  });
  Mocha.test("side effect config", () => {
    let u = 3;
    u = u + 1 | 0;
    Test_utils.eq("File \"ffi_js_test.res\", line 79, characters 7-14", u, 4);
  });
  Mocha.test("GADT operations", () => {});
});

export {
  keys,
  int_config,
  string_config,
  vv,
  v,
  vvv,
  vvvv,
  create_prim,
}
/*  Not a pure module */
