Skip to content

supabase db test not detecting test files when called from the supabase folder #4711

@justusrk

Description

@justusrk

Bug report

  • [ x] I confirm this is a bug with Supabase, not with my own application.

Describe the bug

The supabase db test command does not detect files when called from the supabase folder itself.
It works when you go to the parent folder and run supabase db test.

To Reproduce

Run supabase test db from the supabase directory. The directory with schemas, migrations and tests.

Expected behavior

The CLI should detect my, test files. But It says 0 Files 0 tests.
This was working well in an older CLI version (2.65.5)
Now working after updating my CLI to 2.72.4

Better Solution

Either provide a config for specifying test files directory and use that to find the files.

OR

Detect the supabase directory, it could be that current directory is supabase, so we should expect the tests folder inside the current directory itself, instead of looking it inside /supabase/tests

System information

  • OS: macOS
  • Version of supabase: [e.g. 2.72.4]

I didn't verify or test extensively! If I am wrong, forgive me for wasting your time. 🙏

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions