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

mozilla / blurts-server / d8b70561-fd45-479b-8315-19ed538e20ee

pending completion
d8b70561-fd45-479b-8315-19ed538e20ee

Pull #2972

circleci

Amri Toufali
minor cleanup
Pull Request #2972: MNTOR-1509 move GA4 to shared script, and correct DNT check for Safari

282 of 1659 branches covered (17.0%)

Branch coverage included in aggregate %.

18 of 18 new or added lines in 2 files covered. (100.0%)

959 of 4499 relevant lines covered (21.32%)

3.55 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/client/js/app-constants.js
1
/* This Source Code Form is subject to the terms of the Mozilla Public
2
 * License, v. 2.0. If a copy of the MPL was not distributed with this
3
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4

5
// PUBLIC APP CONSTANTS – DO NOT ADD SECRETS HERE
6

7
/* During build-phase (npm start), ESBuild creates `buildConstants` as defined in esbuild.js, which include server env vars.
8
These are merged into client AppConstants and exported.
9

10
When app is run via `npm run dev`, ESBuild does not run and `buildConstants` is undefined.
11
For this case, we can add fallback vars to AppConstants if needed for testing. */
12

13
/* global buildConstants */
14

15
const AppConstants = {}
×
16

17
if (typeof buildConstants === 'object') {
×
18
  // Build-phase has run (npm start) and ESBuild defined `buildConstants` object
19
  Object.assign(AppConstants, buildConstants)
×
20
} else {
21
  // Build-phase was not run (npm run dev). Assign fallbacks for testing if needed.
22
  Object.assign(AppConstants, {
×
23
    GA4_MEASUREMENT_ID: 'G-CXG8K4KW4P'
24
  })
25
  console.log('Skipped build-phase. Using default/fallback values for AppConstants.', AppConstants)
×
26
}
27

28
export default Object.freeze(AppConstants)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc