• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

optimizely / javascript-sdk / 40718606588
78%

Build:
DEFAULT BRANCH: master
Ran 28 Oct 2026 03:43PM UTC
Jobs 4
Files 126
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

28 Oct 2026 03:42PM UTC coverage: 77.554% (-0.07%) from 77.624%
40718606588

push

github

web-flow
[FSSDK-13343] Skip the default browser event store when localStorage is unavailable (#1184)

## Summary
- **localStorage check:** new `isLocalStorageAvailable()` in `lib/utils/env/browser.ts`. It returns `false` when reading the `localStorage` global throws (a `ReferenceError` where it isn't defined, such as SSR, or a `SecurityError` where storage is blocked, such as disabled cookies or sandboxed iframes) or when the global is `null`.
- **Browser batch event processor:** `createBatchEventProcessor` only builds its default `LocalStorageCache`-backed `EventStore` when localStorage is available. Otherwise it runs without an event store and adds a Warn startup log: `localStorage is not available, events will not be persisted.` A user-provided `eventStore` is used exactly as before, whether or not localStorage is available.
- **Startup logs from platform factories:** `getBatchEventProcessor` accepts a `startupLogs` option and puts those logs before its own, without changing the caller's array. The option is on the internal `BatchEventProcessorFactoryOptions` only; the public `BatchEventProcessorOptions` is unchanged.

Before this change, the browser factory always created a `LocalStorageCache` event store. Where localStorage can't be accessed, every store operation threw. With no event store, events are still batched and dispatched; failed events just aren't persisted for retry across page loads.


Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

1549 of 3035 branches covered (51.04%)

Branch coverage included in aggregate %.

11 of 21 new or added lines in 4 files covered. (52.38%)

8996 of 10562 relevant lines covered (85.17%)

261.19 hits per line

Uncovered Changes

Lines Coverage ∆ File
6
36.59
-2.12% lib/event_processor/event_processor_factory.browser.ts
3
40.0
lib/utils/env/browser.ts
1
28.43
-1.16% lib/event_processor/event_processor_factory.ts
Jobs
ID Job ID Ran Files Coverage
1 run-24 - 40718606588.1 28 Oct 2026 03:43PM UTC 126
77.55
GitHub Action Run
2 run-18 - 40718606588.2 28 Oct 2026 03:43PM UTC 126
77.55
GitHub Action Run
3 run-20 - 40718606588.3 28 Oct 2026 03:43PM UTC 126
77.55
GitHub Action Run
4 run-22 - 40718606588.4 28 Oct 2026 03:43PM UTC 126
77.55
GitHub Action Run
Source Files on build 40718606588
  • Tree
  • List 126
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 11bd1719 on github
  • Prev Build on master (#39262215553)
  • Next Build on master (#40923608974)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc