Skip to content

Commit

Permalink
add arborist test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
reggi committed Sep 13, 2024
1 parent 0094e7f commit 779a5da
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97921,6 +97921,20 @@ ArboristNode {
}
`

exports[`test/arborist/build-ideal-tree.js TAP should take devEngines in account > must match snapshot 1`] = `
{
"name": "empty-update",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "empty-update"
}
}
}

`

exports[`test/arborist/build-ideal-tree.js TAP store files with a custom indenting > must match snapshot 1`] = `
{
"name": "tab-indented-package-json",
Expand Down
15 changes: 15 additions & 0 deletions workspaces/arborist/test/arborist/build-ideal-tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -3979,3 +3979,18 @@ t.test('store files with a custom indenting', async t => {
const tree = await buildIdeal(path)
t.matchSnapshot(String(tree.meta))
})

t.test('should take devEngines in account', async t => {
const path = t.testdir({
'package.json': JSON.stringify({
name: 'empty-update',
devEngines: {
runtime: {
name: 'node',
},
},
}),
})
const tree = await buildIdeal(path)
t.matchSnapshot(String(tree.meta))
})

0 comments on commit 779a5da

Please sign in to comment.