wip - claude --resume 742969c2-ab50-4a79-b7bd-3971e9fd314d
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import {describe, expect, it} from 'vitest'
|
||||
|
||||
import {bundleAsync} from '../../../src/lib/async/bundle'
|
||||
|
||||
describe('bundle', () => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {describe, expect, it} from '@jest/globals'
|
||||
import {describe, expect, it} from 'vitest'
|
||||
import tldts from 'tldts'
|
||||
|
||||
import {isEmailMaybeInvalid} from '#/lib/strings/email'
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import {describe, expect, it} from 'vitest'
|
||||
|
||||
import {isNetworkError} from '../../src/lib/strings/errors'
|
||||
|
||||
describe('isNetworkError', () => {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import {createDownloadResumable, deleteAsync} from 'expo-file-system/legacy'
|
||||
import {manipulateAsync, SaveFormat} from 'expo-image-manipulator'
|
||||
import {afterEach, beforeEach, describe, expect, it, type Mock, vi} from 'vitest'
|
||||
|
||||
import {
|
||||
downloadAndResize,
|
||||
@@ -16,10 +17,10 @@ const mockResizedImage = {
|
||||
}
|
||||
|
||||
describe('downloadAndResize', () => {
|
||||
const errorSpy = jest.spyOn(global.console, 'error')
|
||||
const errorSpy = vi.spyOn(global.console, 'error')
|
||||
|
||||
beforeEach(() => {
|
||||
const mockedCreateResizedImage = manipulateAsync as jest.Mock
|
||||
const mockedCreateResizedImage = manipulateAsync as Mock
|
||||
mockedCreateResizedImage.mockResolvedValue({
|
||||
uri: 'file://resized-image.jpg',
|
||||
...mockResizedImage,
|
||||
@@ -27,13 +28,13 @@ describe('downloadAndResize', () => {
|
||||
})
|
||||
|
||||
afterEach(() => {
|
||||
jest.clearAllMocks()
|
||||
vi.clearAllMocks()
|
||||
})
|
||||
|
||||
it('should return resized image for valid URI and options', async () => {
|
||||
const mockedFetch = createDownloadResumable as jest.Mock
|
||||
const mockedFetch = createDownloadResumable as Mock
|
||||
mockedFetch.mockReturnValue({
|
||||
cancelAsync: jest.fn(),
|
||||
cancelAsync: vi.fn(),
|
||||
downloadAsync: jest
|
||||
.fn()
|
||||
.mockResolvedValue({uri: 'file://resized-image.jpg'}),
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import {describe, expect, it} from 'vitest'
|
||||
|
||||
import {getLikelyType, LikelyType} from '../../src/lib/link-meta/link-meta'
|
||||
|
||||
describe('getLikelyType', () => {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import {describe, expect, it} from 'vitest'
|
||||
|
||||
import {clamp} from '../../src/lib/numbers'
|
||||
|
||||
describe('clamp', () => {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import {RichText} from '@atproto/api'
|
||||
import {i18n} from '@lingui/core'
|
||||
import {describe, expect, it} from 'vitest'
|
||||
|
||||
import {parseEmbedPlayerFromUrl} from '#/lib/strings/embed-player'
|
||||
import {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import {describe, expect, it} from 'vitest'
|
||||
|
||||
import {type IsValidHandle, validateServiceHandle} from '#/lib/strings/handles'
|
||||
|
||||
describe('handle validation', () => {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import {describe, expect, it} from 'vitest'
|
||||
|
||||
import {
|
||||
getMentionAt,
|
||||
insertMentionAt,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {describe, expect, it} from '@jest/globals'
|
||||
import {describe, expect, it} from 'vitest'
|
||||
|
||||
import {
|
||||
isPossiblyAUrl,
|
||||
|
||||
Reference in New Issue
Block a user