]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
test: remove old tests from 4dc1f1b
authorEduardo San Martin Morote <posva13@gmail.com>
Sun, 19 Dec 2021 22:07:53 +0000 (23:07 +0100)
committerEduardo San Martin Morote <posva13@gmail.com>
Sun, 19 Dec 2021 22:07:53 +0000 (23:07 +0100)
packages/pinia/__tests__/actions.spec.ts

index 0fbc0b20116101d750e06c94d37750a89153cca6..45e49156df05cb1c092515451b39e4fa760117af 100644 (file)
@@ -147,22 +147,6 @@ describe('Actions', () => {
     expect(() => store.throws()).toThrowError('fail')
   })
 
-  it.skip('can avoid thrown errors to propagate', () => {
-    const store = useStore()
-    store.$onAction(({ onError }) => {
-      onError(() => false)
-    })
-    expect(() => store.throws()).not.toThrowError('fail')
-  })
-
-  it.skip('can avoid async errors to propagate', async () => {
-    const store = useStore()
-    store.$onAction(({ onError }) => {
-      onError(() => false)
-    })
-    await expect(store.rejects()).resolves.toBe(undefined)
-  })
-
   it('throws async errors', async () => {
     const store = useStore()
     expect.assertions(1)
@@ -178,45 +162,6 @@ describe('Actions', () => {
     expect(spy).toHaveBeenCalledWith('fail')
   })
 
-  it.skip('can override the returned value', () => {
-    const store = useStore()
-    expect.assertions(2)
-    store.$onAction(({ after }) => {
-      // @ts-expect-error: cannot return a string because no action returns a string
-      after((v) => {
-        expect(v).toBe(false)
-        return 'hello'
-      })
-    })
-    expect(store.toggle()).toBe('hello')
-  })
-
-  it.skip('can override the resolved value', async () => {
-    const store = useStore()
-    expect.assertions(2)
-    store.$onAction(({ after }) => {
-      // @ts-expect-error: cannot return a string because no action returns a string
-      after((v) => {
-        expect(v).toBe(false)
-        return 'hello'
-      })
-    })
-    await expect(store.getNonA()).resolves.toBe('hello')
-  })
-
-  it.skip('can override the resolved value with a promise', async () => {
-    const store = useStore()
-    expect.assertions(2)
-    store.$onAction(({ after }) => {
-      // @ts-expect-error: cannot return a string because no action returns a string
-      after(async (v) => {
-        expect(v).toBe(false)
-        return 'hello'
-      })
-    })
-    await expect(store.getNonA()).resolves.toBe('hello')
-  })
-
   it('can destructure actions', () => {
     const store = useStore()
     const { simple } = store