mongodb / chatbot

MongoDB Chatbot Framework. Powered by MongoDB and Atlas Vector Search.
https://mongodb.github.io/chatbot/
Apache License 2.0
106 stars 48 forks source link

Work around test that times out #409

Closed nlarew closed 2 months ago

nlarew commented 2 months ago
FAIL  src/sources/MongoDbDotComDataSource.test.ts (26.539 s)
  ● MongoDbDotComDataSource › should fetch pages

    thrown: "Exceeded timeout of 5000 ms for a test.
    Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."

      13 | });
      14 | describe("MongoDbDotComDataSource", () => {
    > 15 |   it("should fetch pages", async () => {
         |   ^
      16 |     const pages = await dotcomDataSource.fetchPages();
      17 |     // writeFileSync('pages.json', JSON.stringify(pages, null, 2))
      18 |     expect(pages.length).toBeGreaterThan(0);

      at src/sources/MongoDbDotComDataSource.test.ts:15:3
      at Object.<anonymous> (src/sources/MongoDbDotComDataSource.test.ts:14:1)

Changes