pingdotgg / uploadthing

File uploads for modern web devs
https://uploadthing.com
MIT License
4.13k stars 305 forks source link

docs: add automated testing guides #822

Open juan-carlos-correa opened 4 months ago

juan-carlos-correa commented 4 months ago

Area of Improvement

I would like to see automated testing guides in the documentation since automation testing is a critical part of software development.

There are testing documentation examples like Next.js itself: https://nextjs.org/docs/app/building-your-application/testing

Proposal:

Probably a good place to add it is something like: https://docs.uploadthing.com/testing

And add a playwright example like: https://docs.uploadthing.com/testing/playwright

So we can have more testing examples in the future using other testing tools.

What do you think?

P.D: I'm willing to contribute adding a Playwright integration test example that I have developed for my personal project in Next.js with app router.

Link to related docs

https://docs.uploadthing.com/

Additional information

I don't see a proper link to related docs, so I put the root domain.

๐Ÿ‘จโ€๐Ÿ‘งโ€๐Ÿ‘ฆ Contributing

markflorkowski commented 4 months ago

I am definitely open to having docs on testing, and would welcome a PR for it! I believe we have had a similar request in the past, but just have not gotten around to it.

juan-carlos-correa commented 4 months ago

I am definitely open to having docs on testing, and would welcome a PR for it! I believe we have had a similar request in the past, but just have not gotten around to it.

I can contribute it with a PR, WIP ๐Ÿค“

juan-carlos-correa commented 4 months ago

I am definitely open to having docs on testing, and would welcome a PR for it! I believe we have had a similar request in the past, but just have not gotten around to it.

Btw, I'm trying to run the docs in my local (I followed the contribution steps), and I'm having this error:

image

I'm not very familiar with turborepo, but I found a reference of that path here: packages/uploadthing/package.json, this part of the json:

 "./tw": {
      "import": {
        "types": "./tw/index.d.ts",
        "default": "./tw/index.js"
      },
      "require": {
        "types": "./tw/index.d.cts",
        "default": "./tw/index.cjs"
      }
    },

Before of making changes I would like to know if this is truly the source of the error, or if I should do something different.

Possibly questions:

Some ideas or feedback regarding this?

markflorkowski commented 4 months ago

Try running pnpm build from the root, then move t the docs folder and run pnpm dev.