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

scriptype / writ-cms / 22571092226

02 Mar 2026 09:02AM UTC coverage: 38.232% (+0.6%) from 37.643%
22571092226

push

github

scriptype
Add e2e test to verify post->attachment linking

637 of 3724 branches covered (17.11%)

Branch coverage included in aggregate %.

14 of 15 new or added lines in 1 file covered. (93.33%)

3 existing lines in 2 files now uncovered.

2217 of 3741 relevant lines covered (59.26%)

1712.64 hits per line

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

95.24
/src/ssg/lib/ContentModelResourceNode.js
1
const { join } = require('path')
9✔
2
const _ = require('lodash')
9✔
3
const { makePermalink } = require('./contentModelHelpers')
9✔
4
const ContentModelNode = require('./ContentModelNode')
9✔
5
const { addLinkBack, serializeLinks, resolveLinks } = require('./linking')
9✔
6

7
class ContentModelResourceNode extends ContentModelNode {
8
  constructor(fsNode, context, settings = {}) {
180✔
9
    super(fsNode, context, settings)
576✔
10
    this.slug = this.title
576✔
11
    this.content = this.fsNode.content
576✔
12
    this.permalink = this.getPermalink()
576✔
13
    this.outputPath = this.getOutputPath()
576✔
14
    this.subtreeMatchers = this.getSubtreeMatchers()
576✔
15
    this.subtree = this.parseSubtree()
576✔
16
  }
17

18
  getPermalink() {
19
    return makePermalink(
288✔
20
      ..._.compact([
21
        this.context.peek()?.permalink,
22
        this.fsNode.name
23
      ])
24
    )
25
  }
26

27
  getOutputPath() {
28
    return join(
288✔
29
      ..._.compact([
30
        this.context.peek()?.outputPath,
31
        this.fsNode.name
32
      ])
33
    )
34
  }
35

36
  getSubtreeMatchers() {
37
    return {}
576✔
38
  }
39

40
  parseSubtree() {
41
    return {}
576✔
42
  }
43

44
  addLinkBack(post, key) {
45
    addLinkBack(this, post, key)
36✔
46
  }
47

48
  resolveLinks(nodes) {
49
    resolveLinks(this, nodes)
576✔
50
  }
51

52
  serializeLinks() {
UNCOV
53
    return serializeLinks(this)
×
54
  }
55

56
  afterEffects(contentModel) {}
57

58
  render(renderer) {}
59
}
60

61
module.exports = ContentModelResourceNode
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