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

chore/fix studio jest tests #25872

Merged
merged 14 commits into from
May 11, 2024
Merged

chore/fix studio jest tests #25872

merged 14 commits into from
May 11, 2024

Conversation

joshenlim
Copy link
Member

@joshenlim joshenlim commented May 8, 2024

Attempt to reinstate our broken unit tests via jest - I've managed to get most of them working except:

  • logs-query.test.js

@joshenlim joshenlim requested a review from a team as a code owner May 8, 2024 09:50
Copy link

vercel bot commented May 8, 2024

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

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 10, 2024 7:39am
studio-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 10, 2024 7:39am
zone-www-dot-com ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 10, 2024 7:39am
3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
database-new ⬜️ Ignored (Inspect) May 10, 2024 7:39am
studio ⬜️ Ignored (Inspect) Visit Preview May 10, 2024 7:39am
studio-self-hosted ⬜️ Ignored (Inspect) Visit Preview May 10, 2024 7:39am

Copy link

supabase bot commented May 8, 2024

No changes detected in supabase directory.
This pull request has been ignored for the connected project xguihxuzqibwxjnimxev due to its connection settings.
Go to Project Integrations Settings ↗︎ in order to change this behavior.


Branching Preview Branches by Supabase.
Learn more about Supabase for Git ↗︎.

setupFiles: ['jest-canvas-mock', './tests/setup/radix'],
testEnvironment: 'jsdom',
testTimeout: 10000,
testRegex: '(.*\\.test.(js|jsx|ts|tsx)$)',
maxConcurrency: 3,
maxWorkers: '50%',
moduleNameMapper: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might need to do a module name mapper for the getto a mock file for the fetchers, don't think it is resolving correctly, resulting in it not getting mocked.
Possible that it was removed in the setup files, as the mock was done globally if my memory serves correctly.
You could also do a manual module mock in jest using jest.mock("lib/...")

@joshenlim joshenlim marked this pull request as ready for review May 9, 2024 08:54
@joshenlim joshenlim changed the title WIP: Chore/fix studio jest tests chore/fix studio jest tests May 9, 2024
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.

None yet

3 participants