TrendWeight v2 Has Launched
ewal.dev2 ポイント投稿者 emmanueloga_1 コメント
await page.getStarted(); // what does this actually do?
vs await page.locator('a', { hasText: 'Get started' }).first().click();
await expect(page.locator('h1', { hasText: 'Installation' })).toBeVisible();
The second version is explicit and self-documenting. Tests don't always benefit from aggressive DRY, but I've seen teams adopt POMs to coordinate between SDETs and SWEs. const age = 40;
const children = [<div ~ "Moe" />, <div ~ "Larry"/>, <div ~ "Curly" />];
return <div age ~ children />;
Rationale: single child elements are ubiquitous in web dev, but most JSX formatters will require 3 lines of code even if there's a single child. <div class={tw(
"block",
"transform transition-all",
"bg-white ring-1 ring-black/5 rounded-xl shadow-2xl",
"max-w-3xl mx-auto overflow-hidden",
"group-data-closed/dialog:opacity-0",
"group-data-closed/dialog:scale-95",
"group-data-enter/dialog:duration-300",
"group-data-enter/dialog:ease-out",
"group-data-leave/dialog:duration-200",
"group-data-leave/dialog:ease-in"
)}>
...
</div>
I currently do this manually but it would be nice to have some tooling to automate that kind of format.
https://emmanueloga.com
https://lobste.rs/~emmanueloga
https://mastodon.gamedev.place/@EmmanuelOga
https://bsky.app/profile/emmanuel-oga.bsky.social