Skip to content

Commit

Permalink
Test for --dry-run table output
Browse files Browse the repository at this point in the history
  • Loading branch information
ritaaktay committed Jan 23, 2024
1 parent 34befd4 commit f3cf124
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 17 deletions.
9 changes: 9 additions & 0 deletions tap-snapshots/test/lib/utils/reify-output.js.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -1632,3 +1632,12 @@ exports[`test/lib/utils/reify-output.js TAP packages changed message > {"added"
}
}
`

exports[`test/lib/utils/reify-output.js TAP prints dedupe difference > diff table 1`] = `
add foo 1.0.0
remove bar 1.0.0
change bar 1.0.0 -> 2.1.0
removed 1 package, and changed 1 package in {TIME}
`
18 changes: 1 addition & 17 deletions test/lib/utils/reify-output.js
Original file line number Diff line number Diff line change
Expand Up @@ -406,21 +406,5 @@ t.test('prints dedupe difference', async t => {
'dry-run': true,
})

t.match(
out,
'add\tfoo\t1.0.0',
'should print added package'
)

t.match(
out,
'remove\tbar\t1.0.0',
'should print removed package'
)

t.match(
out,
'change\tbar\t1.0.0 -> 2.1.0',
'should print changed package'
)
t.matchSnapshot(out, 'diff table')
})

0 comments on commit f3cf124

Please sign in to comment.