blob: 70c7b242f6f844a825fee637c8d5f4796b32c442 [file] [log] [blame]
Cameron Martin21ed4a22024-04-22 11:08:19 +01001import test from "tape";
2import { IncludeTest as IncludeTestEs5 } from "./gen-nodejs/Include_types.js";
3import { IncludeTest as IncludeTestEs6 } from "./gen-nodejs-es6/Include_types.js";
4import { IncludeTest as IncludeTestEsm } from "./gen-nodejs-esm/Include_types.mjs";
5
6function constructTest(classVariant) {
7 return function (t) {
8 const obj = new classVariant({ bools: { im_true: true, im_false: false } });
9
10 t.assert(obj.bools.im_true === true);
11 t.assert(obj.bools.im_false === false);
12 t.end();
13 };
14}
15
16test("construct es5", constructTest(IncludeTestEs5));
17test("construct es6", constructTest(IncludeTestEs6));
18test("construct esm", constructTest(IncludeTestEsm));