Skip to content

Commit d91bf51

Browse files
Sync svelte docs (#1566)
sync svelte docs Co-authored-by: svelte-docs-bot[bot] <196124396+svelte-docs-bot[bot]@users.noreply.github.com>
1 parent 0344642 commit d91bf51

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

apps/svelte.dev/content/docs/svelte/03-template-syntax/12-bind.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ Since 5.6.0, if an `<input>` has a `defaultValue` and is part of a form, it will
9696
9797
## `<input bind:checked>`
9898

99-
Checkbox and radio inputs can be bound with `bind:checked`:
99+
Checkbox inputs can be bound with `bind:checked`:
100100

101101
```svelte
102102
<label>
@@ -118,6 +118,8 @@ Since 5.6.0, if an `<input>` has a `defaultChecked` attribute and is part of a f
118118
</form>
119119
```
120120

121+
> [!NOTE] Use `bind:group` for radio inputs instead of `bind:checked`.
122+
121123
## `<input bind:indeterminate>`
122124

123125
Checkboxes can be in an [indeterminate](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/indeterminate) state, independently of whether they are checked or unchecked:

apps/svelte.dev/content/docs/svelte/07-misc/02-testing.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: Testing
55

66
Testing helps you write and maintain your code and guard against regressions. Testing frameworks help you with that, allowing you to describe assertions or expectations about how your code should behave. Svelte is unopinionated about which testing framework you use — you can write unit tests, integration tests, and end-to-end tests using solutions like [Vitest](https://vitest.dev/), [Jasmine](https://jasmine.github.io/), [Cypress](https://www.cypress.io/) and [Playwright](https://playwright.dev/).
77

8-
## Unit and integration testing using Vitest
8+
## Unit and component tests with Vitest
99

1010
Unit tests allow you to test small isolated parts of your code. Integration tests allow you to test parts of your application to see if they work together. If you're using Vite (including via SvelteKit), we recommend using [Vitest](https://vitest.dev/). You can use the Svelte CLI to [setup Vitest](/docs/cli/vitest) either during project creation or later on.
1111

@@ -247,7 +247,7 @@ test('Component', async () => {
247247

248248
When writing component tests that involve two-way bindings, context or snippet props, it's best to create a wrapper component for your specific test and interact with that. `@testing-library/svelte` contains some [examples](https://testing-library.com/docs/svelte-testing-library/example).
249249

250-
### Component testing with Storybook
250+
## Component tests with Storybook
251251

252252
[Storybook](https://storybook.js.org) is a tool for developing and documenting UI components, and it can also be used to test your components. They're run with Vitest's browser mode, which renders your components in a real browser for the most realistic testing environment.
253253

@@ -289,7 +289,7 @@ You can create stories for component variations and test interactions with the [
289289
/>
290290
```
291291

292-
## E2E tests using Playwright
292+
## End-to-end tests with Playwright
293293

294294
E2E (short for 'end to end') tests allow you to test your full application through the eyes of the user. This section uses [Playwright](https://playwright.dev/) as an example, but you can also use other solutions like [Cypress](https://www.cypress.io/) or [NightwatchJS](https://nightwatchjs.org/).
295295

0 commit comments

Comments
 (0)