Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix http 422 errors #970

Merged
merged 1 commit into from
Oct 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
* https://jestjs.io/docs/en/configuration.html
*/
import type { Config } from '@jest/types'
import { BeeRequestOptions } from './src'
import { createPostageBatch } from './src/modules/debug/stamps'
import { Bee, BeeRequestOptions } from './src'

import { Types } from 'cafe-utility'
import { DEFAULT_BATCH_AMOUNT, DEFAULT_BATCH_DEPTH } from './test/utils'

export default async (): Promise<Config.InitialOptions> => {
Expand Down Expand Up @@ -33,11 +33,12 @@ export default async (): Promise<Config.InitialOptions> => {
}

const stamps = await Promise.all(
stampsOrder.map(async order =>
createPostageBatch(order.requestOptions, DEFAULT_BATCH_AMOUNT, DEFAULT_BATCH_DEPTH, {
stampsOrder.map(async order => {
const bee = new Bee(Types.asString(order.requestOptions.baseURL))
return bee.createPostageBatch(DEFAULT_BATCH_AMOUNT, DEFAULT_BATCH_DEPTH, {
waitForUsable: true,
}),
),
})
}),
)

for (let i = 0; i < stamps.length; i++) {
Expand Down
Loading