From 60cfbeee41359b7b46dd0b24983e97af63bed4ac Mon Sep 17 00:00:00 2001 From: Jay Ohms Date: Thu, 2 Nov 2023 09:16:02 -0400 Subject: [PATCH] Explicitly test that visit.hasCachedSnapshot() returns a boolean, which is what the native adapters expect --- src/tests/unit/native_adapter_support_tests.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/tests/unit/native_adapter_support_tests.js b/src/tests/unit/native_adapter_support_tests.js index 08f9e5b17..dc3967959 100644 --- a/src/tests/unit/native_adapter_support_tests.js +++ b/src/tests/unit/native_adapter_support_tests.js @@ -96,6 +96,15 @@ test("test visit started notifies adapter", async () => { assert.equal(visit.location, locatable) }) +test("test visit has cached snapshot returns boolean", async () => { + const locatable = window.location.toString() + + await Turbo.navigator.startVisit(locatable) + + const [visit] = adapter.startedVisits + assert.equal(visit.hasCachedSnapshot(), false) +}) + test("test visit completed notifies adapter", async () => { const locatable = window.location.toString()