js-waku/src/test_utils/nwaku.node.spec.ts

26 lines
577 B
TypeScript
Raw Normal View History

2022-02-04 14:12:00 +11:00
import { expect } from "chai";
2021-03-22 16:02:10 +11:00
2022-05-26 15:50:51 +10:00
import { argsToArray, defaultArgs } from "./nwaku";
2021-03-11 10:54:35 +11:00
2022-04-01 12:19:51 +11:00
describe("nwaku", () => {
2022-02-04 14:12:00 +11:00
it("Correctly serialized arguments", function () {
const args = defaultArgs();
Object.assign(args, { portsShift: 42 });
const actual = argsToArray(args);
const expected = [
2022-02-04 14:12:00 +11:00
"--listen-address=127.0.0.1",
2022-05-26 15:49:39 +10:00
"--nat=none",
2022-02-04 14:12:00 +11:00
"--relay=true",
"--rpc=true",
"--rpc-admin=true",
"--websocket-support=true",
"--log-level=DEBUG",
2022-02-04 14:12:00 +11:00
"--ports-shift=42",
];
expect(actual).to.deep.equal(expected);
});
2021-03-12 10:44:47 +11:00
});