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

scriptype / writ-cms / 19316730697

13 Nov 2025 12:49AM UTC coverage: 19.323% (+0.7%) from 18.626%
19316730697

push

github

scriptype
Introduce ContentModelNode

A ContentModelNode class is implemented by abstracting out the most
basic model: attachment.

So far models that extend ContentModelNode are: attachment, asset,
homepage, subpage.

_baseEntry's main functionality is extracted into small helpers in a new
helper module called parseTextEntry

ContentModel's helpers are duplicated into lib/ContentModelHelpers with
the idea of eventually nothing in contentModel needing to use those
helpers or something like that.

Next: post, category, collection, contentModel index

146 of 3405 branches covered (4.29%)

Branch coverage included in aggregate %.

119 of 189 new or added lines in 10 files covered. (62.96%)

10 existing lines in 2 files now uncovered.

916 of 2091 relevant lines covered (43.81%)

101.37 hits per line

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

50.0
/src/compiler/contentModel/models/attachment.js
1
const ContentModelNode = require('../../../lib/ContentModelNode')
9✔
2

3
class Attachment extends ContentModelNode {
4
  constructor(fsNode, context) {
NEW
5
    super(fsNode, context)
×
6
  }
7

8
  render(renderer) {
NEW
9
    return renderer.copy({
×
10
      src: this.fsNode.absolutePath,
11
      dest: this.outputPath,
12
      recursive: !!this.fsNode.children
13
    })
14
  }
15
}
16

17
module.exports = Attachment
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