From dd032caf40c314a6cadcaa2fc6f8fb38f485ad7f Mon Sep 17 00:00:00 2001 From: rafaelsideguide <150964962+rafaelsideguide@users.noreply.github.com> Date: Tue, 5 Mar 2024 18:59:55 -0300 Subject: [PATCH] sometimes transcribes "were" and sometimes "are". Making sure tests work on both cases. --- src/__tests__/providers/Video/index.test.ts | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/__tests__/providers/Video/index.test.ts b/src/__tests__/providers/Video/index.test.ts index f48e418..3da75d6 100644 --- a/src/__tests__/providers/Video/index.test.ts +++ b/src/__tests__/providers/Video/index.test.ts @@ -18,14 +18,11 @@ describe("VideoDataProvider", () => { expect(documents.length).toBe(1); expect(documents[0].content).not.toBe(null); expect(documents[0].content.length).toBeGreaterThan(0); - expect(documents).toEqual([ - { - content: - "Miss Green, I am afraid your case just got a lot more complicated than expected. So, does this mean I will not get the loan? I thought you are the most qualified advisor. I didn't say that. I will do my best to obtain a loan for you, but it might take a little longer.", - metadata: { sourceURL: optionsURLs.urls[0] }, - provider: "video", - type: "video", - }, - ]); + expect(documents[0].content).toMatch( + /Miss Green, I am afraid your case just got a lot more complicated than expected. So, does this mean I will not get the loan\? I thought you (are|were) the most qualified advisor. I didn't say that. I will do my best to obtain a loan for you, but it might take a little longer./ + ); + expect(documents[0].metadata).toEqual({ sourceURL: optionsURLs.urls[0] }); + expect(documents[0].provider).toBe("video"); + expect(documents[0].type).toBe("video"); }); });