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

scriptype / writ-cms / 20149772199

11 Dec 2025 10:41PM UTC coverage: 32.695% (+0.1%) from 32.574%
20149772199

push

github

scriptype
Extend ContentModel from ContentModelEntryNode

Completing the first pass of classification

435 of 3436 branches covered (12.66%)

Branch coverage included in aggregate %.

51 of 58 new or added lines in 2 files covered. (87.93%)

25 existing lines in 6 files now uncovered.

1391 of 2149 relevant lines covered (64.73%)

1154.81 hits per line

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

84.62
/src/lib/ContentModelEntryNode.js
1
const { join } = require('path')
9✔
2
const makeSlug = require('slug')
9✔
3
const { makePermalink } = require('./contentModelHelpers')
9✔
4
const { parseTextEntry } = require('./parseTextEntry')
9✔
5
const ContentModelNode = require('./ContentModelNode')
9✔
6

7
class ContentModelEntryNode extends ContentModelNode {
8
  constructor(fsNode, context, settings = {}) {
×
9
    super(fsNode, context, settings)
2,160✔
10

11
    this.indexFile = this.getIndexFile()
2,160✔
12

13
    const isFlatData = !fsNode.stats?.birthtime
2,160✔
14
    const entryProperties = parseTextEntry(
2,160✔
15
      this.fsNode,
16
      this.indexFile || this.fsNode,
2,367✔
17
      isFlatData
18
    )
19

20
    Object.assign(this, entryProperties)
2,160✔
21

22
    this.slug = this.getSlug()
2,160✔
23
    this.permalink = this.getPermalink()
2,160✔
24
    this.outputPath = this.getOutputPath()
2,160✔
25
    this.subtree = {}
2,160✔
26
  }
27

28
  getIndexFile() {
UNCOV
29
    return this.fsNode
×
30
  }
31

32
  getSlug() {
33
    return this.slug
1,980✔
34
  }
35

36
  getPermalink() {
37
    return makePermalink(
1,305✔
38
      this.context.peek().permalink,
39
      this.slug
40
    ) + (this.hasIndex ? '' : '.html')
1,305✔
41
  }
42

43
  getOutputPath() {
44
    return join(
1,917✔
45
      this.context.peek().outputPath,
46
      this.slug
47
    )
48
  }
49

50
  getSubtreeMatchers() {
UNCOV
51
    return {}
×
52
  }
53

54
  parseSubtree() {
UNCOV
55
    return {}
×
56
  }
57

58
  afterEffects(contentModel) {}
59

60
  render(renderer) {}
61
}
62

63
module.exports = ContentModelEntryNode
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