Referring to this tweet, when I said that you have to run a Playwright test through the CLI, Denb, on the ItaliaJS Discord channel, shared this VSCode cuustom task with me that allows launching specifically the test the cursor is pointing.
Following Stately announcing the latest release of XState/test, I played a bit with the tool.
I have some doubts aobut the fact that XState/test does not allow (if I am not mistaken) to quickly isolate tests where each of them have their unique setup processes.
Here the gists I used to generate the screenshots I used in this series of tweets.
It happened to me that the "Element is detached from the DOM" Cypress' error was related to a bunch of requests that, when settled, caused the UI to re-render.
This is anattempt of waiting for all of requests to be settled, without knowing in advance how many of them are made.
You can discuss it on Twitter.
<!doctype html> | |
<html lang="en-US" data-reactroot=""><head><link rel="icon" type="image/png" href="/rstatic/favicon_green.png"/><script> | |
window.__env = { | |
dataApiUrl: 'http://localhost:8080', | |
isAdminSecretSet: 'true', | |
consoleMode: 'server', | |
nodeEnv: 'development', | |
serverVersion: 'v1.0.0', | |
urlPrefix: '/', |
import { Login } from './Login' | |
import { Connect } from './Connect' | |
import { Content } from './Content' | |
import { useInit } from './hooks/useInit' | |
import { useAppStatus } from './hooks/useAppStatus' | |
import { GenericInstructions } from './GenericInstructions' | |
import { UserNotAllowedState } from './UserNotAllowedState' | |
import { AllOrdersSelectedError } from './AllOrdersSelectedError' | |
import { SelectOrdersInstructions } from './SelectOrdersInstructions' |
import { useEffect, useLayoutEffect, useRef, useState } from 'react' | |
import { | |
setShopifyShop, | |
useAuthSession, | |
useConnectStatus, | |
useShopifyArguments, | |
useShopifyUserData, | |
} from '@/atoms' | |
import { useDetectPage } from './useDetectPage' |
I had to be creative with TypeScript to prevent a common problem in our codebase, where we can't validate our *.d.ts files through skipLibCheck: false
and a type (Action
) sometimes become any
...
import type { Plugin } from 'vite' | |
import path from 'path' | |
const name = 'prevent-server-data-circular-imports' | |
const defaultOptions = { verbose: false } | |
// Detect if the module is in server-data | |
const serverDataFileRegexp = /(.*)?server-data\/src\// | |
// Extract the imported path |
This gist are for my Vite migration articles, here you can find the links to the articles
- Migrating a 150K LOC codebase to Vite and ESBuild: Why? (Part 1/3) (Medium - dev.to)
- Migrating a 150K LOC codebase to Vite and ESBuild: How? (Part 2/3) (Medium - dev.to)
- Migrating a 150K LOC codebase to Vite and ESBuild: Is it worthile? (Part 3/3) (Medium - [dev.to](https://dev.to/noriste/migrating-a-150k-loc-codebase-to-vite-and-esbuild-is-it-worthwhil