question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Typo in the test code & different behavior in command

See original GitHub issue

Hi In the exists_test there is a typo that said return 1 but it should return 0

Deno.test("when the key does not eist", async (t) => {
  await t.step("it returns 1", async () => {
    const key = newKey();

    const res = await new ExistsCommand([key]).exec(client);
    assertEquals(res, 0);
  });
});

Also composing the bitpos command from Redis and Upstash console is different. for example this command in upstash return 24 but in Redis has error because it does not defined bit which is 0 or 1, even if you define it the value is different from Upstash.

set key "Hello World"
-> OK
bitpos key 2 3
-> 24

if you run same command in Redis, it said The bit argument must be 1 or 0 if you define it return 16

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
mdogancommented, Jul 6, 2022

Now I see that upstash-redis library is missing a bit arg in the command definition.

https://github.com/upstash/upstash-redis/blob/f45ddfd070505ea41af21e9309c1529f1e164e69/pkg/commands/bitpos.ts#L6-L13

1reaction
chronarkcommented, Jul 6, 2022

Fixed bitpos in #122, I’ll merge and release later today.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting Started with Behavior Testing in Python with Behave
We'lll be setting up a new project with the Behave library and using test-driven development to build the code based off of behavioral ......
Read more >
Simple tests pass in opened UI but fail on command line ...
Current behavior:​​ Simple tests against web-app work, but when I run them in the headless mode, they fail and the error given is...
Read more >
Analysis of Error Handling Test Results - GitBook
This is undocumented behavior; PowerShell's help files state that both the preference variable and parameter should only be affecting non-terminating errors.
Read more >
Autograder Ouput and Error Messages
Your program (or its components) executed without crashing or hanging (indicated by other messages), but its behavior did not match the correct solution....
Read more >
Error -17300 When Calling Testexec.exe From Command Line
However, when I run this code I get the following error: ... Do you notice different behavior when running the sequence file from...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found