epicweb-dev / epicshop

The workshop app for all workshops on EpicWeb.dev
https://www.epicweb.dev
Other
205 stars 33 forks source link

"Unsupported" test type toast in the UI #211

Closed kettanaito closed 3 months ago

kettanaito commented 3 months ago

The "Tests" tab in the Mocking Techniques workshop looks like this:

Screenshot 2024-07-24 at 14 51 46

For some reason, the app.test.type for the tests there is (probably) none (expected browser).

Perhaps there's a way to disable the Tests tab altogether? While there's nothing Node-specific in my tests, @kentcdodds mentioned running tests may not behave entirely as expected for non-browser tests.

kentcdodds commented 3 months ago

Ok, so this is why you're getting this error:

https://github.com/epicweb-dev/epicshop/blob/8c25a3566a0c76b38428a91887ee548fcd7423d2/packages/workshop-app/app/routes/_app%2B/app.%24appName%2B/test.%24testName.ts#L29

If the tests are browser-based, but the app is not then you'll get this error.

I think the solution is indeed to have a mechanism for disabling the test tab. I've really wanted to avoid configuration like this, but I think we should probably just have a config option for it.

kentcdodds commented 3 months ago

Forgot to mention this issue, but it's fixed: https://github.com/epicweb-dev/epicshop/commit/5708376c8ea62f7e7723539a4b7288caeb89d7db

kettanaito commented 3 months ago

Thank you, @kentcdodds! Confirm it working.