HtmlGeoExtractorTest

21

tests

0

failures

0

ignored

0.048s

duration

100%

successful

Tests

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

Standard output

01:32:38.068 [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]