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

mozilla / blurts-server / #13117

pending completion
#13117

push

circleci

Vinnl
Pretend HTMLElement.shadowRoot is always set

We generally only tend to access it after having called
this.attachShadow({ mode: 'open' }), and the error message about it
potentially being undefined at every location we access
this.shadowRoot is more noisy than helpful.

See also
https://github.com/mozilla/blurts-server/pull/2959#discussion_r1154023113
and
https://github.com/mozilla/blurts-server/pull/2959#discussion_r1154960095

282 of 1629 branches covered (17.31%)

Branch coverage included in aggregate %.

1 of 1 new or added line in 1 file covered. (100.0%)

959 of 4374 relevant lines covered (21.93%)

1.83 hits per line

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

0.0
/src/routes/index.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
import AppConstants from '../app-constants.js'
6
import express from 'express'
7

8
import adminRoutes from './admin.js'
9
import authRoutes from './auth.js'
10
import dockerFlowRoutes from './dockerflow.js'
11
import hibpApiRoutes from './api/v1/hibp.js'
12
import previewRoutes from './preview.js'
13
import userApiRoutes from './api/v1/user.js'
14
import userRoutes from './user.js'
15
import breachesRoutes from './breaches.js'
16
import breachDetailsRoutes from './breach-details.js'
17

18
import { dialog } from '../controllers/dialog.js'
19
import { landingPage } from '../controllers/landing.js'
20
import { notFoundPage } from '../controllers/notFound.js'
21
import { notFound } from '../middleware/error.js'
22
import { doubleCsrfProtection } from '../utils/csrf.js'
23

24
const router = express.Router()
×
25

26
router.get('/', landingPage)
×
27
router.get('*/dialog/:name', dialog)
×
28

29
router.use('/admin', doubleCsrfProtection, adminRoutes)
×
30
router.use('/api/v1/hibp/', hibpApiRoutes)
×
31
router.use('/api/v1/user/', doubleCsrfProtection, userApiRoutes)
×
32
router.use('/oauth', doubleCsrfProtection, authRoutes)
×
33
router.use('/user', doubleCsrfProtection, userRoutes)
×
34
router.use('/breaches', doubleCsrfProtection, breachesRoutes)
×
35
router.use('/breach-details', doubleCsrfProtection, breachDetailsRoutes)
×
36
router.use('/', doubleCsrfProtection, dockerFlowRoutes)
×
37

38
// Do not make the non-auth previews available on prod
39
if (AppConstants.NODE_ENV !== 'production') {
×
40
  router.use('/preview', previewRoutes)
×
41
}
42

43
router.use(notFound)
×
44
router.use(notFoundPage)
×
45

46
export default router
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