Fix/p token (#1305)

* preview-token

* Nick:

---------

Co-authored-by: rafaelmmiller <150964962+rafaelsideguide@users.noreply.github.com>
This commit is contained in:
Nicolas
2025-03-06 19:03:33 -03:00
committed by GitHub
parent 39b1390289
commit 60346ecfa3
8 changed files with 19 additions and 37 deletions
@@ -55,7 +55,7 @@ describe('FirecrawlApp<"v0"> E2E Tests', () => {
"should return successful response with valid preview token",
async () => {
const app = new FirecrawlApp<"v0">({
apiKey: "this_is_just_a_preview_token",
apiKey: process.env.PREVIEW_TOKEN,
apiUrl: API_URL,
version: "v0",
});
@@ -40,7 +40,7 @@ describe('FirecrawlApp E2E Tests', () => {
});
test.concurrent('should return successful response with valid preview token', async () => {
const app = new FirecrawlApp({ apiKey: "this_is_just_a_preview_token", apiUrl: API_URL });
const app = new FirecrawlApp({ apiKey: process.env.PREVIEW_TOKEN, apiUrl: API_URL });
const response = await app.scrapeUrl('https://roastmywebsite.ai');
if (!response.success) {
throw new Error(response.error);
@@ -365,7 +365,7 @@ describe('FirecrawlApp E2E Tests', () => {
});
test.concurrent('should return successful response with valid preview token', async () => {
const app = new FirecrawlApp({ apiKey: "this_is_just_a_preview_token", apiUrl: API_URL });
const app = new FirecrawlApp({ apiKey: process.env.PREVIEW_TOKEN, apiUrl: API_URL });
const response = await app.mapUrl('https://roastmywebsite.ai') as MapResponse;
expect(response).not.toBeNull();
expect(response.links?.length).toBeGreaterThan(0);