js-waku/packages/tests/tests/nwaku.node.spec.ts
2022-12-15 13:54:07 +11:00

25 lines
566 B
TypeScript

import { expect } from "chai";
import { argsToArray, defaultArgs } from "../src/index.js";
describe("nwaku", () => {
it("Correctly serialized arguments", function () {
const args = defaultArgs();
Object.assign(args, { portsShift: 42 });
const actual = argsToArray(args);
const expected = [
"--listen-address=127.0.0.1",
"--rpc=true",
"--relay=false",
"--rpc-admin=true",
"--websocket-support=true",
"--log-level=TRACE",
"--ports-shift=42",
];
expect(actual).to.deep.equal(expected);
});
});