From 2a2105e69dd4460f0c9c29034c6a928cd81ff8ae Mon Sep 17 00:00:00 2001 From: SamTV12345 <40429738+SamTV12345@users.noreply.github.com> Date: Sun, 16 Jul 2023 21:04:19 +0200 Subject: [PATCH] Only generate keys without underscore. (#378) --- test/test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test.ts b/test/test.ts index d826275f..5e02b56b 100644 --- a/test/test.ts +++ b/test/test.ts @@ -13,7 +13,7 @@ import {deepEqual, equal, rejects} from 'assert' const fs = {promises}.promises; const maxKeyLength = 100; -const randomString = (length = maxKeyLength) => new Randexp(new RegExp(`.{${length}}`)).gen(); +const randomString = (length = maxKeyLength) => new Randexp(new RegExp(`.{${length}}`)).gen().replace("_",""); // eslint-disable-next-line mocha/no-top-level-hooks after(async () => { // Add a timeout to forcibly exit if something is keeping node from exiting cleanly. @@ -153,7 +153,7 @@ describe(__filename, () => { deepEqual(keys, [key]); }); it('remove works', async () => { - const input = {a: 1, b: new Randexp(/.+/).gen().replace("_","")}; + const input = {a: 1, b: new Randexp(/.+/)}; const key = randomString(); await db.set(key, input); equal(JSON.stringify(await db.get(key)), JSON.stringify(input));