HtmlGeoExtractorTest

21

tests

0

failures

0

ignored

0.009s

duration

100%

successful

Tests

Test Duration Result
JSON-LD takes priority over data attributes when both present() 0s passed
accepts Corsica coordinates() 0s 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() 0s passed
extracts from JSON-LD nested in RealEstateListing() 0.001s passed
extracts from JSON-LD schema Place geo object() 0s passed
extracts from Leaflet data-lat data-lng attributes() 0s passed
extracts from Leaflet marker call() 0s passed
extracts from data-latitude data-longitude attributes() 0s passed
extracts from google maps LatLng constructor() 0s passed
extracts from og latitude longitude() 0s 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.002s 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() 0s passed
returns null when no geo signal present() 0.001s passed

Standard output

23:03:04.468 [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]