Skip to content

Commit 716f76a

Browse files
committed
test: remove old tests from 4dc1f1b
1 parent 145192a commit 716f76a

File tree

1 file changed

+0
-55
lines changed

1 file changed

+0
-55
lines changed

packages/pinia/__tests__/actions.spec.ts

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -147,22 +147,6 @@ describe('Actions', () => {
147147
expect(() => store.throws()).toThrowError('fail')
148148
})
149149

150-
it.skip('can avoid thrown errors to propagate', () => {
151-
const store = useStore()
152-
store.$onAction(({ onError }) => {
153-
onError(() => false)
154-
})
155-
expect(() => store.throws()).not.toThrowError('fail')
156-
})
157-
158-
it.skip('can avoid async errors to propagate', async () => {
159-
const store = useStore()
160-
store.$onAction(({ onError }) => {
161-
onError(() => false)
162-
})
163-
await expect(store.rejects()).resolves.toBe(undefined)
164-
})
165-
166150
it('throws async errors', async () => {
167151
const store = useStore()
168152
expect.assertions(1)
@@ -178,45 +162,6 @@ describe('Actions', () => {
178162
expect(spy).toHaveBeenCalledWith('fail')
179163
})
180164

181-
it.skip('can override the returned value', () => {
182-
const store = useStore()
183-
expect.assertions(2)
184-
store.$onAction(({ after }) => {
185-
// @ts-expect-error: cannot return a string because no action returns a string
186-
after((v) => {
187-
expect(v).toBe(false)
188-
return 'hello'
189-
})
190-
})
191-
expect(store.toggle()).toBe('hello')
192-
})
193-
194-
it.skip('can override the resolved value', async () => {
195-
const store = useStore()
196-
expect.assertions(2)
197-
store.$onAction(({ after }) => {
198-
// @ts-expect-error: cannot return a string because no action returns a string
199-
after((v) => {
200-
expect(v).toBe(false)
201-
return 'hello'
202-
})
203-
})
204-
await expect(store.getNonA()).resolves.toBe('hello')
205-
})
206-
207-
it.skip('can override the resolved value with a promise', async () => {
208-
const store = useStore()
209-
expect.assertions(2)
210-
store.$onAction(({ after }) => {
211-
// @ts-expect-error: cannot return a string because no action returns a string
212-
after(async (v) => {
213-
expect(v).toBe(false)
214-
return 'hello'
215-
})
216-
})
217-
await expect(store.getNonA()).resolves.toBe('hello')
218-
})
219-
220165
it('can destructure actions', () => {
221166
const store = useStore()
222167
const { simple } = store

0 commit comments

Comments
 (0)