stackblitz-labs / pkg.pr.new

Continuous (Preview) Releases for your libraries!
https://pkg.pr.new
887 stars 36 forks source link

THE REFACTOR #18

Open Aslemammad opened 4 months ago

Aslemammad commented 4 months ago

For now, all the tests are e2e and they send real requests and real data.

That's why we have so many comments in https://github.com/stackblitz-labs/temporary-test/pull/1

It's better to someway mock those requests and achieve faster tests.

Aslemammad commented 4 months ago

Ok, this is way important than I thought after working on #36!

We need smoother tests. And agile ones.

Aslemammad commented 4 months ago

Should be dealt with after the beta milestone!

romadryud commented 2 months ago

@Aslemammad We are using msw for mocking api call's. Do you have a plan where what and why needed to be tested first? I'm happy to help with some contribution!

Aslemammad commented 2 months ago

Thank you so much, for sure! we'd be happy to have you.

What we want to achieve is potentially remove the e2e directory and have vitest there and we do not rely on any github api call for instance. So the test should run completely offline, I do not know if this is doable or not, but I guess it is.

@AriPerkkio shared few thoughts with me a while ago, I'd like to see his direction too.

romadryud commented 2 months ago

@Aslemammad, I'll create a pull request this week, and we can have a discussion based on some code :)

AriPerkkio commented 2 months ago

Here's the Github API mock I've used with MSW:

The second one is a Github action that does PR comments as well.

Aslemammad commented 2 months ago

Thank you all, I'm really excited.

mahdikhashan commented 1 month ago

@Aslemammad is it still an issue? I couldn't find a related PR. I'd like to work on it.

Aslemammad commented 1 month ago

For sure, feel free to send your explorations in a PR!