From 3d0511cbc432ad0685c15d0707ea4dea33c1e667 Mon Sep 17 00:00:00 2001 From: Cafe137 <77121044+Cafe137@users.noreply.github.com> Date: Mon, 28 Oct 2024 14:49:12 +0100 Subject: [PATCH] ci: fix http 422 errors (#970) --- jest.config.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/jest.config.ts b/jest.config.ts index 9023ebe4..081fd8d5 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -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 => { @@ -33,11 +33,12 @@ export default async (): Promise => { } 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++) {