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

mozilla / blurts-server / #13281

pending completion
#13281

push

circleci

jswinarton
Merge branch 'main' into premium-scaffold

282 of 1687 branches covered (16.72%)

Branch coverage included in aggregate %.

188 of 188 new or added lines in 26 files covered. (100.0%)

959 of 4564 relevant lines covered (21.01%)

1.75 hits per line

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

0.0
/src/client/js/appConstants.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('Running dev-mode with fallback values for 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