]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
docs: better comments
authorEduardo San Martin Morote <posva13@gmail.com>
Mon, 28 Jun 2021 14:52:07 +0000 (16:52 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Mon, 28 Jun 2021 14:52:07 +0000 (16:52 +0200)
docs/cookbook/testing.md
src/testing.ts

index 1e96565b937a2af4c14ab9b04aa505e0d6790fec..a4e023f7336b2d8b7a3976e3e14d09e0b427a627 100644 (file)
@@ -1,5 +1,9 @@
 # Testing stores
 
+:::warning
+This code is still not released.
+::::
+
 Stores will, by design, be used at many places and can make testing much harder than it should be. Fortunately, this doesn't have to be the case. We need to take care of three things when testing stores:
 
 - The `pinia` instance: Stores cannot work without it
index e309757c3fab7e7eca66b57d7a9feedb7843fb4c..f8154bc5918dcd772bd724a68514e6b58886fda9 100644 (file)
@@ -12,13 +12,16 @@ export interface TestingOptions {
   /**
    * When set to false, actions are only spied, they still get executed. When
    * set to true, actions will be replaced with spies, resulting in their code
-   * not being executed. Defaults to true.
+   * not being executed. Defaults to true. NOTE: when providing `createSpy()`,
+   * it will **only** make the `fn` argument `undefined`. You still have to
+   * handle this in `createSpy()`.
    */
   stubActions?: boolean
 
   /**
    * When set to true, calls to `$patch()` won't change the state. Defaults to
-   * false.
+   * false. NOTE: when providing `createSpy()`, it will **only** make the `fn`
+   * argument `undefined`. You still have to handle this in `createSpy()`.
    */
   stubPatch?: boolean