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

scriptype / writ-cms / 13855402303

14 Mar 2025 11:13AM UTC coverage: 81.515% (+0.005%) from 81.51%
13855402303

push

github

scriptype
[CM2] Add basic props & pass ctx to attachments

417 of 579 branches covered (72.02%)

Branch coverage included in aggregate %.

33 of 37 new or added lines in 7 files covered. (89.19%)

1 existing line in 1 file now uncovered.

2079 of 2483 relevant lines covered (83.73%)

373.93 hits per line

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

30.0
/src/compiler/contentModel2/models/subpage.js
1
const settings = require('../../../settings').getSettings()
9✔
2
const models = {
9✔
3
  _baseEntry: require('./_baseEntry')
4
}
5

6
function subpage(node) {
7
  const baseEntryProps = models._baseEntry(node, ['index', 'page'])
×
8

9
  const permalink = (
NEW
10
    settings.permalinkPrefix +
×
11
    baseEntryProps.slug +
12
    (node.children ? '' : '.html')
×
13
  )
14

NEW
15
  const pageContext = {
×
16
    title: baseEntryProps.title,
17
    slug: baseEntryProps.slug,
18
    permalink
19
  }
20

UNCOV
21
  return {
×
22
    ...baseEntryProps,
23
    ...pageContext,
NEW
24
    attachments: baseEntryProps.attachments.map(a => a({
×
25
      page: pageContext
26
    }))
27
  }
28
}
29

30
module.exports = subpage
9✔
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

© 2026 Coveralls, Inc