mirror of https://github.com/status-im/js-waku.git
test: need to specify in memory sqlite
So that messages are not persisted between tests.
This commit is contained in:
parent
9cdc9f96ac
commit
66270836f8
|
@ -47,6 +47,7 @@ export interface Args {
|
||||||
lightpush?: boolean;
|
lightpush?: boolean;
|
||||||
filter?: boolean;
|
filter?: boolean;
|
||||||
store?: boolean;
|
store?: boolean;
|
||||||
|
storeMessageDbUrl?: string;
|
||||||
topics?: string;
|
topics?: string;
|
||||||
rpcPrivate?: boolean;
|
rpcPrivate?: boolean;
|
||||||
websocketSupport?: boolean;
|
websocketSupport?: boolean;
|
||||||
|
@ -422,7 +423,7 @@ export function argsToArray(args: Args): Array<string> {
|
||||||
|
|
||||||
for (const [key, value] of Object.entries(args)) {
|
for (const [key, value] of Object.entries(args)) {
|
||||||
// Change the key from camelCase to kebab-case
|
// Change the key from camelCase to kebab-case
|
||||||
const kebabKey = key.replace(/([A-Z])/, (_, capital) => {
|
const kebabKey = key.replace(/([A-Z])/g, (_, capital) => {
|
||||||
return "-" + capital.toLowerCase();
|
return "-" + capital.toLowerCase();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -441,6 +442,7 @@ export function defaultArgs(): Args {
|
||||||
rpc: true,
|
rpc: true,
|
||||||
rpcAdmin: true,
|
rpcAdmin: true,
|
||||||
websocketSupport: true,
|
websocketSupport: true,
|
||||||
|
storeMessageDbUrl: "sqlite://:memory:",
|
||||||
logLevel: LogLevel.Debug,
|
logLevel: LogLevel.Debug,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,7 @@ describe("nwaku", () => {
|
||||||
"--rpc=true",
|
"--rpc=true",
|
||||||
"--rpc-admin=true",
|
"--rpc-admin=true",
|
||||||
"--websocket-support=true",
|
"--websocket-support=true",
|
||||||
|
"--store-message-db-url=sqlite://:memory:",
|
||||||
"--log-level=DEBUG",
|
"--log-level=DEBUG",
|
||||||
"--ports-shift=42",
|
"--ports-shift=42",
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in New Issue