Browse Source

fixup! refactor(interaction): move Approval and Question into UI owners

imccyu 1 month ago
parent
commit
0b6269b50c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      packages/interaction/user-questions/tests/user-questions.spec.ts

+ 2 - 2
packages/interaction/user-questions/tests/user-questions.spec.ts

@@ -148,7 +148,7 @@ describe('UserQuestionService', () => {
       name: 'UserQuestionError',
       code: 'ASK_CANCELLED',
     })
-    ctx.userQuestions.registerProvider({ ask: () => Promise.reject(transported) })
+    registerAnswerer(ctx, { ask: () => Promise.reject(transported) })
 
     const rejection = await ctx.userQuestions.ask({
       questions: [{ id: 'confirm', question: 'Proceed?' }],
@@ -174,7 +174,7 @@ describe('UserQuestionService', () => {
   ])('preserves %s from the provider', async (_label, rejection) => {
     const ctx = new Context()
     await ctx.plugin(UserQuestionService)
-    ctx.userQuestions.registerProvider({ ask: vi.fn().mockRejectedValue(rejection) })
+    registerAnswerer(ctx, { ask: vi.fn().mockRejectedValue(rejection) })
 
     await expect(ctx.userQuestions.ask({
       questions: [{ id: 'confirm', question: 'Proceed?' }],