Skip to content

Commit

Permalink
docs: fix typos (#2808)
Browse files Browse the repository at this point in the history
  • Loading branch information
s0h311 authored Oct 27, 2024
1 parent 99ab76c commit 84c935e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/docs/cookbook/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ expect(store.someAction).toHaveBeenCalledTimes(1)

### Mocking the returned value of an action

Actions are automatically spied but type-wise, they are still the regular actions. In order to get the correct type, we must implement a custom type-wrapper that is applies the `Mock` type to each action. **This type depends on the testing framework you are using**. Here is an example with Vitest:
Actions are automatically spied but type-wise, they are still the regular actions. In order to get the correct type, we must implement a custom type-wrapper that applies the `Mock` type to each action. **This type depends on the testing framework you are using**. Here is an example with Vitest:

```ts
import type { Mock } from 'vitest'
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/core-concepts/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ This is why you can access all computed properties without `.value` and why they
If you want to add new state properties to a store or properties that are meant to be used during hydration, **you will have to add it in two places**:

- On the `store` so you can access it with `store.myState`
- On `store.$state` so it can be used in devtools and, **be serialized during SSR**.
- On `store.$state` so it can be used in devtools and **be serialized during SSR**.

On top of that, you will certainly have to use a `ref()` (or other reactive API) in order to share the value across different accesses:

Expand Down
4 changes: 2 additions & 2 deletions packages/docs/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ Pinia is a store library for Vue, it allows you to share a state across componen
- Testing utilities
- Plugins: extend Pinia features with plugins
- Proper TypeScript support or **autocompletion** for JS users
- Server Side Rendering Support
- Server Side Rendering support
- Devtools support
- A timeline to track actions, mutations
- A timeline to track actions and mutations
- Stores appear in components where they are used
- Time travel and easier debugging
- Hot module replacement
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/zh/cookbook/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ expect(store.someAction).toHaveBeenCalledTimes(1)

### Mocking the returned value of an action

Actions are automatically spied but type-wise, they are still the regular actions. In order to get the correct type, we must implement a custom type-wrapper that is applies the `Mock` type to each action. **This type depends on the testing framework you are using**. Here is an example with Vitest:
Actions are automatically spied but type-wise, they are still the regular actions. In order to get the correct type, we must implement a custom type-wrapper that applies the `Mock` type to each action. **This type depends on the testing framework you are using**. Here is an example with Vitest:

```ts
import type { Mock } from 'vitest'
Expand Down

0 comments on commit 84c935e

Please sign in to comment.