diff --git a/src/__tests__/providers/Confluence/index.test.ts b/src/__tests__/providers/Confluence/index.test.ts index 6b16276..bebfa8c 100644 --- a/src/__tests__/providers/Confluence/index.test.ts +++ b/src/__tests__/providers/Confluence/index.test.ts @@ -9,14 +9,14 @@ test( provider: "confluence", }); - if (!process.env.NANGO_CONNECTION_ID_TEST) { + if (!process.env.NANGO_CONFLUENCE_CONNECTION_ID_TEST) { throw new Error( - "Please specify the NANGO_CONNECTION_ID_TEST environment variable." + "Please specify the NANGO_CONFLUENCE_CONNECTION_ID_TEST environment variable." ); } await confluenceDataConnector.authorizeNango({ - nango_connection_id: process.env.NANGO_CONNECTION_ID_TEST, + nango_connection_id: process.env.NANGO_CONFLUENCE_CONNECTION_ID_TEST, }); const pages = await confluenceDataConnector.getDocuments(); diff --git a/src/__tests__/providers/GitHub/index.test.ts b/src/__tests__/providers/GitHub/index.test.ts index 5746b50..f3ef7e9 100644 --- a/src/__tests__/providers/GitHub/index.test.ts +++ b/src/__tests__/providers/GitHub/index.test.ts @@ -9,14 +9,14 @@ test( provider: "github", }); - if (!process.env.NANGO_CONNECTION_ID_TEST) { + if (!process.env.NANGO_GITHUB_CONNECTION_ID_TEST) { throw new Error( - "Please specify the NANGO_CONNECTION_ID_TEST environment variable." + "Please specify the NANGO_GITHUB_CONNECTION_ID_TEST environment variable." ); } await githubDataConnector.authorizeNango({ - nango_connection_id: process.env.NANGO_CONNECTION_ID_TEST, + nango_connection_id: process.env.NANGO_GITHUB_CONNECTION_ID_TEST, }); // Test the format of returned documents diff --git a/src/__tests__/providers/GoogleDrive/index.test.ts b/src/__tests__/providers/GoogleDrive/index.test.ts index 585f565..9751eee 100644 --- a/src/__tests__/providers/GoogleDrive/index.test.ts +++ b/src/__tests__/providers/GoogleDrive/index.test.ts @@ -14,9 +14,12 @@ test( }); await googleDriveDataConnector.setOptions({ - filesIds:['1zGA5Kxy_itvUDnSAC9PAlK_yb5oB6OJt'] + filesIds:[] }) const documents = await googleDriveDataConnector.getDocuments(); + for (const doc of documents) { + console.log({doc}) + } expect(documents.length).toBeGreaterThan(0); expect(documents[0].content).not.toBe(null); diff --git a/src/__tests__/providers/Jira/index.test.ts b/src/__tests__/providers/Jira/index.test.ts index 298266f..b0ba06b 100644 --- a/src/__tests__/providers/Jira/index.test.ts +++ b/src/__tests__/providers/Jira/index.test.ts @@ -9,14 +9,14 @@ test( provider: "jira", }); - if (!process.env.NANGO_CONNECTION_ID_TEST) { + if (!process.env.NANGO_JIRA_CONNECTION_ID_TEST) { throw new Error( - "Please specify the NANGO_CONNECTION_ID_TEST environment variable." + "Please specify the NANGO_JIRA_CONNECTION_ID_TEST environment variable." ); } await jiraDataConnector.authorizeNango({ - nango_connection_id: process.env.NANGO_CONNECTION_ID_TEST, + nango_connection_id: process.env.NANGO_JIRA_CONNECTION_ID_TEST, }); const issues = await jiraDataConnector.getDocuments(); diff --git a/src/__tests__/providers/Notion/index.test.ts b/src/__tests__/providers/Notion/index.test.ts index 40330d8..be93c9b 100644 --- a/src/__tests__/providers/Notion/index.test.ts +++ b/src/__tests__/providers/Notion/index.test.ts @@ -9,14 +9,14 @@ test( provider: "notion", }); - if (!process.env.NANGO_CONNECTION_ID_TEST) { + if (!process.env.NANGO_NOTION_CONNECTION_ID_TEST) { throw new Error( - "Please specify the NANGO_CONNECTION_ID_TEST environment variable." + "Please specify the NANGO_NOTION_CONNECTION_ID_TEST environment variable." ); } await notionDataConnector.authorizeNango({ - nango_connection_id: process.env.NANGO_CONNECTION_ID_TEST, + nango_connection_id: process.env.NANGO_NOTION_CONNECTION_ID_TEST, }); const pages = await notionDataConnector.getDocuments(); diff --git a/src/__tests__/providers/Salesforce/index.test.ts b/src/__tests__/providers/Salesforce/index.test.ts index 9b75c9f..0a6c93c 100644 --- a/src/__tests__/providers/Salesforce/index.test.ts +++ b/src/__tests__/providers/Salesforce/index.test.ts @@ -9,14 +9,14 @@ test( provider: "salesforce", }); - if (!process.env.NANGO_CONNECTION_ID_TEST) { + if (!process.env.NANGO_SALESFORCE_CONNECTION_ID_TEST) { throw new Error( - "Please specify the NANGO_CONNECTION_ID_TEST environment variable." + "Please specify the NANGO_SALESFORCE_CONNECTION_ID_TEST environment variable." ); } await salesforceDataConnector.authorizeNango({ - nango_connection_id: process.env.NANGO_CONNECTION_ID_TEST, + nango_connection_id: process.env.NANGO_SALESFORCE_CONNECTION_ID_TEST, }); salesforceDataConnector.setOptions({ mode: "accounts" }); diff --git a/src/__tests__/providers/YouTube/index.test.ts b/src/__tests__/providers/YouTube/index.test.ts index 11dc5b1..37ed0ae 100644 --- a/src/__tests__/providers/YouTube/index.test.ts +++ b/src/__tests__/providers/YouTube/index.test.ts @@ -33,45 +33,4 @@ describe("YouTubeDataProvider", () => { ); expect(documents[0].content.toLowerCase()).toContain("say"); }); - - it( - "should return transcription from multiple youtube videos from a specific channel", - async () => { - const urls = ["https://www.youtube.com/@sideguide1530"]; - - const youtubeDataConnector = createDataConnector({ - provider: "youtube", - }); - - await youtubeDataConnector.setOptions({ urls, isChannel: true }); - - const documents = await youtubeDataConnector.getDocuments(); - expect(documents).not.toBe(null); - expect(documents.length).toBeGreaterThan(0); - expect(documents[0].content).not.toBe(null); - expect(documents[0].content.length).toBeGreaterThan(0); - - expect(documents).toContainEqual({ - content: expect.stringContaining( - "hi everybody my name is eric and i'm one" - ), - metadata: { - sourceURL: "https://www.youtube.com/watch?v=DagdM1jPlpo", - }, - provider: "youtube", - type: "text", - }); - expect(documents).toContainEqual({ - content: expect.stringContaining( - "stop watching youtube tutorials to learn" - ), - metadata: { - sourceURL: "https://www.youtube.com/watch?v=LlHyUuJ7fN4", - }, - provider: "youtube", - type: "text", - }); - }, - 10 * 1000 - ); // 10 seconds });