Skip to content

Commit 6ca5cdf

Browse files
committed
Fixed sightGuidelines tests
1 parent b2e0883 commit 6ca5cdf

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/inspection-capture-web/test/PhotoCapture/hooks/usePhotoCaptureSightGuidelines.test.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ describe('usePhotoCaptureSightGuidelines', () => {
1010
beforeEach(() => {
1111
localStorage.clear();
1212
});
13+
afterEach(() => {
14+
localStorage.clear();
15+
});
1316

1417
it('should return showSightGuidelines as true when enableSightGuidelines is ENABLED', () => {
1518
const { result } = renderHook(() =>
@@ -44,7 +47,10 @@ describe('usePhotoCaptureSightGuidelines', () => {
4447
});
4548

4649
it('should return showSightGuidelines as true when enableSightGuidelines is EPHEMERAL and TTL is expired', () => {
47-
localStorage.setItem(STORAGE_KEY_PHOTO_CAPTURE_GUIDELINES, (Date.now() - TTL_MS).toString());
50+
localStorage.setItem(
51+
STORAGE_KEY_PHOTO_CAPTURE_GUIDELINES,
52+
(Date.now() - TTL_MS - 1).toString(),
53+
);
4854

4955
const { result } = renderHook(() =>
5056
usePhotoCaptureSightGuidelines({

0 commit comments

Comments
 (0)