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

fix: failing tests for raw queries #249

Merged
merged 2 commits into from
Dec 9, 2023
Merged

fix: failing tests for raw queries #249

merged 2 commits into from
Dec 9, 2023

Conversation

HansGabriel
Copy link
Owner

@HansGabriel HansGabriel commented Dec 9, 2023

Description

The following PR fixes the following:

  1. Raw queries for getting the top trekkers for a particular test by changing table names and fields to their snake case name
  2. Raw queries for getting the number of tests a player is top 3 in by changing table names and fields to their snake case name
  3. Change mocked tests for getting top trekker details
  4. Change mocked tests for getting the number of tests a player is top 3 in

Code Snippets

Added this type since raw SQL returns snake_cased keys for objects

export type _PlayersHighscore = {
  id: string;
  user_first_name: string;
  user_image_url: string;
  play_created_at: Date;
  high_score: number;
};

Screenshots/Images

N/A

How Has This Been Tested?

Changed unit tests for raw sql queries

Copy link

vercel bot commented Dec 9, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
test-trek-backend ✅ Ready (Inspect) Visit Preview Dec 9, 2023 7:41pm

@HansGabriel HansGabriel self-assigned this Dec 9, 2023
@EdmelKun EdmelKun merged commit 45fb5d7 into main Dec 9, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants