HtmlGeoExtractorTest

21

tests

0

failures

0

ignored

0.029s

duration

100%

successful

Tests

Test Duration Result
JSON-LD takes priority over data attributes when both present() 0s 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() 0s passed
extracts from JSON-LD schema Place geo object() 0.001s passed
extracts from Leaflet data-lat data-lng attributes() 0.004s passed
extracts from Leaflet marker call() 0.001s passed
extracts from data-latitude data-longitude attributes() 0s passed
extracts from google maps LatLng constructor() 0s passed
extracts from og latitude longitude() 0.001s passed
extracts from place location meta tags() 0s passed
extracts from typical Preux-style anonymized listing fixture() 0s passed
ignores malformed JSON-LD() 0.004s passed
rejects coordinates outside France bounds() 0.002s passed
rejects zero zero coordinates() 0.009s passed
returns null for blank html() 0.001s passed
returns null for null html() 0.001s passed
returns null when no geo signal present() 0.001s passed

Standard output

05:24:28.767 [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]