Skip to content

Commit bae8e33

Browse files
committed
grammar
1 parent da5983e commit bae8e33

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

exercises/02.vitest-browser-mode/README.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The next thing to solve was the _test process_ itself. Different tools run your
1616

1717
Vitest Browser Mode is similar to Cypress in this regard, meaning that your browser tests are run in the browser. One important distinction here is that since Vitest relies on Vite to compile tests, it can compile your test suite _in the browser_, enabling features like TypeScript and ESM out of the box. You don't have to write lengthy Jest configurations just to have ESM in your tests anymore 🎉
1818

19-
> This is _incredibly_ powerful. Not only does Vitest reuse your existing Vite config, making your code in production and your code in tests be transformed the same way, you can use its rich plugins system to achieve virtually anything. This makes your testing setup highly customizable.
19+
> This is _incredibly_ powerful. Not only does Vitest reuse your existing Vite config, letting your code in production and your code in tests be transformed the same way, you can use its rich plugins system to achieve virtually anything. This makes your testing setup highly customizable.
2020
2121
And, finally, Vitest needs something to _render_ the components. Browser Mode is not specific to any particular front-end framework and presently can render React, Vue, and Svelte components natively. You can also build your custom renderers a bit easier since the rendering actually happens in the DOM.
2222

@@ -36,4 +36,4 @@ There are also a few advantages I find in Vitest Browser Mode when compared to o
3636
- **Component rendering model**. Running in the browser, your components can render similarly to how they are rendered in production. Vitest has a more [straightforward rendering flow](https://github.com/vitest-dev/vitest-browser-react/blob/1d6be8ca8d94bb2289b6260886f76a6e527c45f7/src/pure.tsx#L50) compared to [Playwright Component Testing](https://github.com/microsoft/playwright/blob/91f46bb5d057a284ff33def5802aba496033c030/packages/playwright-ct-core/src/mount.ts#L61), where Playwright has to channel the rendering from the test (Node.js) to the browser.
3737
- **Flexibility**. You can use Vitest for both unit tests, Node.js integration tests, and in-browser integration tests. In fact, Vitest makes that easy to do with the concept of workspaces, which you will get your hands on later in this workshop.
3838

39-
Alright, that's enough details. It's time you put Vitest Browser Mode to work for your tests. Let's go!
39+
Alright, we've set the scene well. Now it's time you put Vitest Browser Mode to work in your tests. Let's go!

0 commit comments

Comments
 (0)