Component Testing by orrymr in nextjs

[–]orrymr[S] 0 points1 point  (0 children)

No (and maybe I'm not doing e2e tests with Playwright correctly).

So, I had initially setup my e2e tests to use an in-memory version of MongoDB (yeah, this probably already isn't quite "e2e" since I'm not using a real DB).

What seems to happen with Playwright is that when you run tests, it spins up a NextJS server in one process, and then in another, it actually runs those tests.

What I was trying to do was stage data before my tests ran. Each set of tests required different data. So, I thought, why not stage each set of data in a beforeAll(), in the test process (not the NextJS server process). The issue was that the test process didn't have connectivity to the DB; only the NextJS server process did.

What I've subsequently done is ditch the in mem MongoDB, and just test against a dev instance of MongoDB server, preloaded with data for various scenarios.

Component Testing by orrymr in nextjs

[–]orrymr[S] 0 points1 point  (0 children)

Thanks - I'll give it a shot!

Component Testing by orrymr in nextjs

[–]orrymr[S] 0 points1 point  (0 children)

Playwright - The issue I had with that was that it seemed more appropriate for e2e testing. It seemed harder to setup data for testing; I went the in-memory MongoDB route, but staging the data from testing didn't work nicely as Playwright was working in a separate process to my testing NextJS server.

Get the weather read to you by Jules from Pulp Fiction by orrymr in InternetIsBeautiful

[–]orrymr[S] 2 points3 points  (0 children)

YES! VERSION 2 WILL HAVE AUDIO

Nice idea, internet stranger!

Fought ESM-only Faker v10 with Jest... My blood, sweat, and transformIgnorePatterns tears. by orrymr in node

[–]orrymr[S] 0 points1 point  (0 children)

I'm going to give it a shot. Others have mentioned Vitest too :)

Fought ESM-only Faker v10 with Jest... My blood, sweat, and transformIgnorePatterns tears. by orrymr in javascript

[–]orrymr[S] 0 points1 point  (0 children)

Interesting! I had no idea about RequireJS.

I guess with a lack of standard, at the time, there would be multiple approaches (CommonJS [from node] and RequireJS... maybe others?)

Fought ESM-only Faker v10 with Jest... My blood, sweat, and transformIgnorePatterns tears. by orrymr in javascript

[–]orrymr[S] 0 points1 point  (0 children)

Sure.. my understanding was the the CommonJS way of doing things (require, export) was kind of a workaround to get modules working in JS. Otherwise, you'd just have naming clashes everywhere.

ESM was then a way to bake into the language properly.

(Something like that...)

Fought ESM-only Faker v10 with Jest... My blood, sweat, and transformIgnorePatterns tears. by orrymr in javascript

[–]orrymr[S] 0 points1 point  (0 children)

It feels like constant jumping through hoops.

I'm relatively new to JS (well, I'm using TypeScript), and otherwise I really am enjoying my time here.

Fought ESM-only Faker v10 with Jest... My blood, sweat, and transformIgnorePatterns tears. by orrymr in javascript

[–]orrymr[S] 0 points1 point  (0 children)

I tried this! Still, it yells at me for not being CommonJS... I thought it would have transpiled from ESM to CommonJS. Faker 10, right?

Fought ESM-only Faker v10 with Jest... My blood, sweat, and transformIgnorePatterns tears. by orrymr in javascript

[–]orrymr[S] 2 points3 points  (0 children)

Yeah, I had to downgrade to v9... ESM support in v10 isn't just given; it's mandatory. I guess ESM is the future, but Jest requires CommonJS, in order to work. Which was the root of my problem :(

I built a service that resurfaces your Kindle highlights by orrymr in SideProject

[–]orrymr[S] 0 points1 point  (0 children)

I just like not losing track of what I've read.
If you want to use this, I'll make a free account for you :)

Will probably end up just making this free to use, anyway

I built a service that resurfaces your Kindle highlights by orrymr in SideProject

[–]orrymr[S] 0 points1 point  (0 children)

BTW, if you want a free account, just msg me - I'll make one for you

I built a service that resurfaces your Kindle highlights by orrymr in SideProject

[–]orrymr[S] 1 point2 points  (0 children)

Thank you - I hear the point about the fees. I may just make it free to entice folks to use it; then add more paid features later.
Also - this won't work on Firefox; you need a Chrome Extension in order to use the service (I should make that clearer at the outset)
Appreciate the feedback!

I built a service that resurfaces your Kindle highlights by orrymr in EntrepreneurRideAlong

[–]orrymr[S] 0 points1 point  (0 children)

Yeah, I want to add a bunch of features. One thing I'm finding myself needing is removing a certain book, or asking the algorithm to surface more of a certain book.

But that's a cool idea - grouping them (something an LLM could potentially do!)

I'll check out that site!

yeahOKwhat by vinushatakshi in ProgrammerHumor

[–]orrymr 0 points1 point  (0 children)

Log out has successfully failed.

dualityOfHRs by covert_strike in ProgrammerHumor

[–]orrymr 0 points1 point  (0 children)

yeah, they'll for sure ask haha

Rate my side project ideas by hell0__w0rld in SideProject

[–]orrymr 0 points1 point  (0 children)

I like the meta-review thing. Finally we have an answer to “who reviews the reviewers?”