Skip to content

Commit

Permalink
test: fix fetch mock
Browse files Browse the repository at this point in the history
  • Loading branch information
willfarrell committed Dec 10, 2023
1 parent 09f334e commit c52b834
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 791 deletions.
3 changes: 1 addition & 2 deletions packages/s3-object-response/__benchmarks__/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ import middleware from '../index.js'

import { mockClient } from 'aws-sdk-client-mock'
import { S3Client, WriteGetObjectResponseCommand } from '@aws-sdk/client-s3'
import mockFetch from 'fetch-mock'

const bench = new Bench({ time: 1_000 })

const context = {
getRemainingTimeInMillis: () => 30000
}

mockFetch.get('http://localhost', 200)
globalThis.fetch = () => Promise.resolve()
const setupHandler = (options = {}) => {
mockClient(S3Client)
.on(WriteGetObjectResponseCommand)
Expand Down
Loading

0 comments on commit c52b834

Please sign in to comment.