HtmlGeoExtractorTest

21

tests

0

failures

0

ignored

0.096s

duration

100%

successful

Tests

Test Duration Result
JSON-LD takes priority over data attributes when both present() 0.003s passed
accepts Corsica coordinates() 0s passed
accepts DOM coordinates (Martinique)() 0s passed
accepts DOM coordinates (Reunion)() 0.004s passed
extracts from JSON latitude longitude fields in embedded script() 0.001s passed
extracts from JSON-LD array of types() 0.006s passed
extracts from JSON-LD nested in RealEstateListing() 0.001s passed
extracts from JSON-LD schema Place geo object() 0.001s passed
extracts from Leaflet data-lat data-lng attributes() 0.006s passed
extracts from Leaflet marker call() 0s passed
extracts from data-latitude data-longitude attributes() 0.001s passed
extracts from google maps LatLng constructor() 0.003s passed
extracts from og latitude longitude() 0.058s passed
extracts from place location meta tags() 0.002s passed
extracts from typical Preux-style anonymized listing fixture() 0.002s passed
ignores malformed JSON-LD() 0.005s passed
rejects coordinates outside France bounds() 0s passed
rejects zero zero coordinates() 0.001s passed
returns null for blank html() 0s passed
returns null for null html() 0.002s passed
returns null when no geo signal present() 0s passed

Standard output

11:03:52.574 [Test worker] WARN com.alertimmo.aiscraping.extraction.HtmlGeoExtractor -- [HtmlGeoExtractor] JSON-LD block present (16 chars) but unparseable: Unexpected character ('i' (code 105)): was expecting double-quote to start field name
 at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 3]