-
-
Notifications
You must be signed in to change notification settings - Fork 995
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
98 changed files
with
2,958 additions
and
2,386 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
editLink: false | ||
--- | ||
|
||
[**API Documentation**](../../../index.md) • **Docs** | ||
|
||
*** | ||
|
||
[API Documentation](../../../index.md) / [@pinia/nuxt](../index.md) / default | ||
|
||
# Function: default() | ||
|
||
> **default**(`this`, `inlineOptions`, `nuxt`): `_ModuleSetupReturn` | ||
## Parameters | ||
|
||
• **this**: `void` | ||
|
||
• **inlineOptions**: [`ModuleOptions`](../interfaces/ModuleOptions.md) | ||
|
||
• **nuxt**: `Nuxt` | ||
|
||
## Returns | ||
|
||
`_ModuleSetupReturn` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
editLink: false | ||
--- | ||
|
||
[**API Documentation**](../../index.md) • **Docs** | ||
|
||
*** | ||
|
||
[API Documentation](../../index.md) / @pinia/nuxt | ||
|
||
# @pinia/nuxt | ||
|
||
## Index | ||
|
||
### Interfaces | ||
|
||
- [ModuleOptions](interfaces/ModuleOptions.md) | ||
|
||
### Functions | ||
|
||
- [default](functions/default.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
packages/docs/api/@pinia/testing/functions/createTestingPinia.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
editLink: false | ||
--- | ||
|
||
[**API Documentation**](../../../index.md) • **Docs** | ||
|
||
*** | ||
|
||
[API Documentation](../../../index.md) / [@pinia/testing](../index.md) / createTestingPinia | ||
|
||
# Function: createTestingPinia() | ||
|
||
> **createTestingPinia**(`options`): [`TestingPinia`](../interfaces/TestingPinia.md) | ||
Creates a pinia instance designed for unit tests that **requires mocking** | ||
the stores. By default, **all actions are mocked** and therefore not | ||
executed. This allows you to unit test your store and components separately. | ||
You can change this with the `stubActions` option. If you are using jest, | ||
they are replaced with `jest.fn()`, otherwise, you must provide your own | ||
`createSpy` option. | ||
|
||
## Parameters | ||
|
||
• **options**: [`TestingOptions`](../interfaces/TestingOptions.md) = `{}` | ||
|
||
options to configure the testing pinia | ||
|
||
## Returns | ||
|
||
[`TestingPinia`](../interfaces/TestingPinia.md) | ||
|
||
a augmented pinia instance |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
editLink: false | ||
--- | ||
|
||
[**API Documentation**](../../index.md) • **Docs** | ||
|
||
*** | ||
|
||
[API Documentation](../../index.md) / @pinia/testing | ||
|
||
# @pinia/testing | ||
|
||
## Index | ||
|
||
### Interfaces | ||
|
||
- [TestingOptions](interfaces/TestingOptions.md) | ||
- [TestingPinia](interfaces/TestingPinia.md) | ||
|
||
### Functions | ||
|
||
- [createTestingPinia](functions/createTestingPinia.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
78 changes: 78 additions & 0 deletions
78
packages/docs/api/@pinia/testing/interfaces/TestingPinia.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
--- | ||
editLink: false | ||
--- | ||
|
||
[**API Documentation**](../../../index.md) • **Docs** | ||
|
||
*** | ||
|
||
[API Documentation](../../../index.md) / [@pinia/testing](../index.md) / TestingPinia | ||
|
||
# Interface: TestingPinia | ||
|
||
Pinia instance specifically designed for testing. Extends a regular | ||
`Pinia` instance with test specific properties. | ||
|
||
## Extends | ||
|
||
- [`Pinia`](../../../pinia/interfaces/Pinia.md) | ||
|
||
## Properties | ||
|
||
### app | ||
|
||
> **app**: `App`\<`any`\> | ||
App used by Pinia | ||
|
||
*** | ||
|
||
### install() | ||
|
||
> **install**: (`app`) => `void` | ||
#### Parameters | ||
|
||
• **app**: `App`\<`any`\> | ||
|
||
#### Returns | ||
|
||
`void` | ||
|
||
#### Inherited from | ||
|
||
[`Pinia`](../../../pinia/interfaces/Pinia.md).[`install`](../../../pinia/interfaces/Pinia.md#install) | ||
|
||
*** | ||
|
||
### state | ||
|
||
> **state**: `Ref`\<`Record`\<`string`, [`StateTree`](../../../pinia/type-aliases/StateTree.md)\>\> | ||
root state | ||
|
||
#### Inherited from | ||
|
||
[`Pinia`](../../../pinia/interfaces/Pinia.md).[`state`](../../../pinia/interfaces/Pinia.md#state) | ||
|
||
## Methods | ||
|
||
### use() | ||
|
||
> **use**(`plugin`): [`Pinia`](../../../pinia/interfaces/Pinia.md) | ||
Adds a store plugin to extend every store | ||
|
||
#### Parameters | ||
|
||
• **plugin**: [`PiniaPlugin`](../../../pinia/interfaces/PiniaPlugin.md) | ||
|
||
store plugin to add | ||
|
||
#### Returns | ||
|
||
[`Pinia`](../../../pinia/interfaces/Pinia.md) | ||
|
||
#### Inherited from | ||
|
||
[`Pinia`](../../../pinia/interfaces/Pinia.md).[`use`](../../../pinia/interfaces/Pinia.md#use) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.