Skip to content

Commit

Permalink
Only generate keys without underscore. (#378)
Browse files Browse the repository at this point in the history
  • Loading branch information
SamTV12345 authored Jul 16, 2023
1 parent 5aaea0e commit 2a2105e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit 2a2105e

Please sign in to comment.