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

mozilla / blurts-server / 24612810-8aa7-46bc-a7ef-4e72040ccf0f

pending completion
24612810-8aa7-46bc-a7ef-4e72040ccf0f

push

circleci

GitHub
Merge pull request #2806 from mozilla/MNTOR-1019/dialog-add-email

282 of 1295 branches covered (21.78%)

Branch coverage included in aggregate %.

39 of 39 new or added lines in 6 files covered. (100.0%)

959 of 3494 relevant lines covered (27.45%)

4.46 hits per line

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

0.0
/src/controllers/dialog.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 { camelize } from '../utils/string-helpers.js'
6

7
async function dialog (req, res) {
8
  const path = req.params.partial
×
9
  const module = await import(`../views/partials/${path}.js`)
×
10
  const exportName = camelize(path)
×
11
  const partial = module[exportName]
×
12
  const data = {
×
13
    something: 'testing'
14
  }
15

16
  if (!partial) return res.sendStatus(404) // kebab-case filename needs to map to camelCase export: `add-email.js` -> `addEmail()`
×
17

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

21
export { dialog }
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