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

mozilla / blurts-server / #13251

pending completion
#13251

push

circleci

web-flow
Merge pull request #2987 from mozilla/MNTOR-1171/code-splitting

MNTOR-1171: Code Splitting

282 of 1663 branches covered (16.96%)

Branch coverage included in aggregate %.

12 of 12 new or added lines in 9 files covered. (100.0%)

959 of 4511 relevant lines covered (21.26%)

1.77 hits per line

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

0.0
/src/controllers/breachDetail.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/allBreaches.js'
9
import { breachDetail } from '../views/partials/breachDetail.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
  }
17

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

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

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

30
  const data = {
×
31
    partial: breachDetail,
32
    skipPartialModule: true,
33
    breach: featuredBreach,
34
    breachLogos: req.app.locals.breachLogoMap
35
  }
36

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

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