Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keyData missing database number #1209

Open
NeilASega opened this issue Jan 28, 2023 · 0 comments
Open

keyData missing database number #1209

NeilASega opened this issue Jan 28, 2023 · 0 comments

Comments

@NeilASega
Copy link

When constructing the keyData string in the ctor you should include the database number - at the moment the db number does not affect the context where the data is stored meaning redis queries return the wrong data.

class RedisMock extends EventEmitter {
  constructor(...args) {
    super()

   ... code removed for brevity

    const optionsWithDefault = { ...defaultOptions, ...getOptions(...args) }

    this.keyData = `${optionsWithDefault.host}:${optionsWithDefault.port}/optionsWithDefault.db` <-- include db here
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants