From 7ed04f791bd9a4ea5532bc6fc7a57874097949d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alberto=20Fern=C3=A1ndez-Capel?= Date: Mon, 13 Nov 2023 16:35:15 +0000 Subject: [PATCH] Bring back test Orginally added by @jayohms in https://github.com/hotwired/turbo/pull/1056/commits/60cfbeee41359b7b46dd0b24983e97af63bed4ac --- 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 36fbd1582..6c8c362d0 100644 --- a/src/tests/unit/native_adapter_support_tests.js +++ b/src/tests/unit/native_adapter_support_tests.js @@ -96,6 +96,15 @@ 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("visit completed notifies adapter", async () => { const locatable = window.location.toString()