Git Product home page Git Product logo

mock-supabase's Introduction

Mocking Supabase in Tests

This repo is some exploration on how to mock supabase in tests using Jest. This should not be the default. With this setup you can run integration tests. We only use this to test error routes on the fastify server, since creating an error on prurpose is hard.

The wired thing is that jest does not recognize the coverage here and I can not spy an server.httpErrors.internalServerError(); either. (╯°□°)╯︵ ┻━┻)

How to

Run on (MacOS)

cd supabase
docker compose up

On Linux use docker-compose up

Wait until your Kong, Auth, Postgrest and Postgres containers are ready

npm test

mock-supabase's People

Contributors

ff6347 avatar renovate-bot avatar renovate[bot] avatar

Stargazers

 avatar Roman avatar

Watchers

 avatar

mock-supabase's Issues

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: Cannot find preset's package (github>whitesource/merge-confidence:beta)

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Awaiting Schedule

These updates are awaiting their schedule. Click on a checkbox to get an update now.

  • chore(deps): update kong docker tag to v3
  • chore(deps): update node.js to v18
  • fix(deps): update dependency @supabase/supabase-js to v2
  • fix(deps): update dependency fastify to v4
  • fix(deps): update dependency fastify-blipp to v4
  • fix(deps): update dependency ts-node-dev to v2

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

docker-compose
supabase/docker-compose.yml
  • supabase/storage-api v0.9.3
supabase/supabase-traefik/docker-compose.yml
supabase/supabase-traefik/traefik/docker-compose.yml
dockerfile
supabase/dockerfiles/kong/Dockerfile
  • kong 2.5
supabase/dockerfiles/postgres/Dockerfile
  • supabase/postgres 13.3.0
github-actions
.github/workflows/tests.yml
  • actions/checkout v2
  • actions/setup-node v2
npm
package.json
  • @supabase/supabase-js 1.25.1
  • @types/jest 27.0.2
  • fastify 3.22.1
  • fastify-blipp 3.1.0
  • fastify-sensible 3.1.1
  • jest 27.3.1
  • ts-jest 27.0.7
  • ts-node-dev 1.1.8
  • @types/node 16.18.23
  • @typescript-eslint/eslint-plugin 4.33.0
  • @typescript-eslint/parser 4.33.0
  • eslint 7.32.0
  • eslint-config-prettier 8.8.0
  • eslint-plugin-jest 24.7.0
  • eslint-plugin-prettier 4.2.1
  • prettier 2.8.7
  • typescript 4.9.5
nvm
.nvmrc
  • node 16.15.0

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.