• 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/controllers/breach-details.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 { getBreachByName } from '../utils/hibp.js'
6

7
import { guestLayout } from '../views/guestLayout.js'
8
import { allBreaches } from '../views/partials/all-breaches.js'
9
import { breachDetails } from '../views/partials/breach-detail.js'
10

11
async function breachesPage (req, res) {
12
  const data = {
×
13
    partial: allBreaches,
14
    breaches: req.app.locals.breaches,
15
    breachLogos: req.app.locals.breachLogoMap,
16
    nonce: res.locals.nonce
17
  }
18

19
  res.send(guestLayout(data))
×
20
}
21

22
async function breachDetailsPage (req, res) {
23
  const allBreaches = req.app.locals.breaches
×
24
  const breachName = req.params.breachName
×
25
  const featuredBreach = getBreachByName(allBreaches, breachName)
×
26

27
  if (!featuredBreach) {
×
28
    return res.redirect('/')
×
29
  }
30

31
  const data = {
×
32
    partial: breachDetails,
33
    breach: featuredBreach,
34
    breachLogos: req.app.locals.breachLogoMap,
35
    nonce: res.locals.nonce
36
  }
37

38
  res.send(guestLayout(data))
×
39
}
40

41
export {
42
  breachDetailsPage,
43
  breachesPage
44
}
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