test: need to specify in memory sqlite

So that messages are not persisted between tests.
This commit is contained in:
fryorcraken.eth 2022-11-15 14:09:04 +11:00
parent 9cdc9f96ac
commit 66270836f8
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
2 changed files with 4 additions and 1 deletions

View File

@ -47,6 +47,7 @@ export interface Args {
lightpush?: boolean;
filter?: boolean;
store?: boolean;
storeMessageDbUrl?: string;
topics?: string;
rpcPrivate?: boolean;
websocketSupport?: boolean;
@ -422,7 +423,7 @@ export function argsToArray(args: Args): Array<string> {
for (const [key, value] of Object.entries(args)) {
// 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();
});
@ -441,6 +442,7 @@ export function defaultArgs(): Args {
rpc: true,
rpcAdmin: true,
websocketSupport: true,
storeMessageDbUrl: "sqlite://:memory:",
logLevel: LogLevel.Debug,
};
}

View File

@ -16,6 +16,7 @@ describe("nwaku", () => {
"--rpc=true",
"--rpc-admin=true",
"--websocket-support=true",
"--store-message-db-url=sqlite://:memory:",
"--log-level=DEBUG",
"--ports-shift=42",
];