uploadthing icon indicating copy to clipboard operation
uploadthing copied to clipboard

docs: add automated testing guides

Open juan-carlos-correa opened this issue 1 year ago โ€ข 4 comments

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

  • [X] ๐Ÿ™‹โ€โ™‚๏ธ Yes, I'd be down to file a PR implementing the suggested changes!

juan-carlos-correa avatar May 21 '24 19:05 juan-carlos-correa

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.

markflorkowski avatar May 21 '24 21:05 markflorkowski

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 avatar May 21 '24 21:05 juan-carlos-correa

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:

  • Version of Node and Pnpm? Answer: I'm using Node and Pnpm LTS versions.

  • What steps did I do? Answer: I forked the repo, ran pnpm install. Then, I moved to docs subfolder, and ran pnpm dev, after that, I had the error that I shared.

Some ideas or feedback regarding this?

juan-carlos-correa avatar May 21 '24 21:05 juan-carlos-correa

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

markflorkowski avatar May 21 '24 22:05 markflorkowski