lint
This commit is contained in:
parent
4cd6c6e9f0
commit
db2f48a1f9
5 changed files with 17 additions and 11 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import { HttpResponse, http } from 'msw'
|
||||
import { setActivePinia, createPinia } from 'pinia'
|
||||
import { createTestingPinia } from '@pinia/testing'
|
||||
import { HttpResponse, http } from 'msw'
|
||||
import { createPinia, setActivePinia } from 'pinia'
|
||||
|
||||
import {
|
||||
authApis,
|
||||
|
|
@ -8,8 +8,8 @@ import {
|
|||
testServer,
|
||||
} from '/test/fixtures/mock_api.js'
|
||||
|
||||
import { useOAuthStore } from 'src/stores/oauth.js'
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useOAuthStore } from 'src/stores/oauth.js'
|
||||
|
||||
const test = injectMswToTest(authApis)
|
||||
|
||||
|
|
@ -61,7 +61,6 @@ describe('oauth store', () => {
|
|||
}),
|
||||
)
|
||||
|
||||
|
||||
const store = useOAuthStore()
|
||||
store.clientId = 'another-id'
|
||||
store.clientSecret = 'another-secret'
|
||||
|
|
@ -183,7 +182,9 @@ describe('oauth store', () => {
|
|||
await expect(store.ensureAppToken()).rejects.toThrowError('Throttled')
|
||||
})
|
||||
|
||||
test('it should throw if we cannot obtain app token', async ({ worker }) => {
|
||||
test('it should throw if we cannot obtain app token', async ({
|
||||
worker,
|
||||
}) => {
|
||||
worker.use(
|
||||
http.post(`${testServer}/oauth/token`, () => {
|
||||
return HttpResponse.text('Throttled', { status: 429 })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue