Skip to content

Commit

Permalink
refactor(test): better arrangement in tests in central folder
Browse files Browse the repository at this point in the history
  • Loading branch information
amjedidiah committed Dec 4, 2024
1 parent 2f313a5 commit 7e0af09
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 205 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { S3Client } from '@aws-sdk/client-s3'
import { getSignedUrl } from '@aws-sdk/s3-request-presigner'
import s3GeneratePresignedUrl from '../../backend/lib/aws/s3/s3-generate-presigned-url'
import s3UpdateCORS from '../../backend/lib/aws/s3/s3-update-cors'
import {
Provider,
UploadError,
UploadErrorType,
} from '../../../../shared/types/StorageSDK'
import s3GeneratePresignedUrl from './s3-generate-presigned-url'
import s3UpdateCORS from './s3-update-cors'
} from '../../shared/types/StorageSDK'

// Mock external dependencies
jest.mock('@aws-sdk/client-s3', () => ({
Expand All @@ -28,7 +28,7 @@ jest.mock('@aws-sdk/client-s3', () => ({
PutObjectCommand: jest.fn(),
}))
jest.mock('@aws-sdk/s3-request-presigner')
jest.mock('./s3-update-cors')
jest.mock('../../backend/lib/aws/s3/s3-update-cors')

describe('s3GeneratePresignedUrl', () => {
// Test data setup
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { render, screen } from '@testing-library/react'
import * as React from 'react'
import MetaVersion from '../../frontend/components/MetaVersion'
import { LIB_VERSION } from '../../version'
import MetaVersion from './MetaVersion'

describe('MetaVersion', () => {
it('renders basic version info', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import checkFileType from './checkFileType'
import checkFileType from '../../shared/lib/checkFileType'

const JPEGImage = {
type: 'image/jpeg',
Expand Down
199 changes: 0 additions & 199 deletions src/lib/storage/provider.ts

This file was deleted.

0 comments on commit 7e0af09

Please sign in to comment.