Skip to content

Commit

Permalink
patch(vest): use withResolvers
Browse files Browse the repository at this point in the history
  • Loading branch information
ealush committed Feb 4, 2025
1 parent 8d477e3 commit 6ac6a86
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/vest-utils/src/withResolvers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ export function withResolvers<T>() {
reject,
};
}
gi
4 changes: 2 additions & 2 deletions packages/vest/src/suite/createSuite.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { asArray, CB, assign } from 'vest-utils';
import { asArray, CB, assign, withResolvers } from 'vest-utils';
import { Bus, VestRuntime } from 'vestjs-runtime';

import { getTypedMethods } from './getTypedMethods';
Expand Down Expand Up @@ -148,7 +148,7 @@ function useCreateSuiteRunner<
T extends CB = CB,
>(suiteCallback: CB, modifiers: SuiteModifiers<F>) {
return function runSuite(...args: Parameters<T>): SuiteResult<F, G> {
const { resolve, promise } = Promise.withResolvers<SuiteResult<F, G>>();
const { resolve, promise } = withResolvers<SuiteResult<F, G>>();
return assign(
promise,
SuiteContext.run(
Expand Down

0 comments on commit 6ac6a86

Please sign in to comment.