mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-06 08:06:01 +08:00
Nick:
This commit is contained in:
parent
04942bb9de
commit
968a2dc753
@ -26,6 +26,7 @@
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"@flydotio/dockerfile": "^0.4.10",
|
||||
"@jest/globals": "^29.7.0",
|
||||
"@tsconfig/recommended": "^1.0.3",
|
||||
"@types/body-parser": "^1.19.2",
|
||||
"@types/bull": "^4.10.0",
|
||||
|
3
apps/api/pnpm-lock.yaml
generated
3
apps/api/pnpm-lock.yaml
generated
@ -192,6 +192,9 @@ importers:
|
||||
'@flydotio/dockerfile':
|
||||
specifier: ^0.4.10
|
||||
version: 0.4.11
|
||||
'@jest/globals':
|
||||
specifier: ^29.7.0
|
||||
version: 29.7.0
|
||||
'@tsconfig/recommended':
|
||||
specifier: ^1.0.3
|
||||
version: 1.0.6
|
||||
|
15
apps/api/src/scraper/WebScraper/__tests__/dns.test.ts
Normal file
15
apps/api/src/scraper/WebScraper/__tests__/dns.test.ts
Normal file
@ -0,0 +1,15 @@
|
||||
import CacheableLookup from 'cacheable-lookup';
|
||||
import https from 'node:https';
|
||||
import axios from "axios";
|
||||
|
||||
describe("DNS", () => {
|
||||
it("cached dns", async () => {
|
||||
const cachedDns = new CacheableLookup();
|
||||
cachedDns.install(https.globalAgent);
|
||||
jest.spyOn(cachedDns, "lookupAsync");
|
||||
|
||||
const res = await axios.get("https://example.com");
|
||||
expect(res.status).toBe(200);
|
||||
expect(cachedDns.lookupAsync).toHaveBeenCalled();
|
||||
});
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user