Skip to content

Commit

Permalink
feat: return normalized config after validation
Browse files Browse the repository at this point in the history
  • Loading branch information
dominykas committed Oct 21, 2020
1 parent b38d096 commit 9acb856
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,6 @@ exports.validate = ({ config: configFilePath }) => {
}

console.log(`✅ ${configFilePath}`)

return result.value
}
15 changes: 14 additions & 1 deletion test/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,20 @@ const validConfigs = [
]

tap.test('should pass with the .wiby.json of the wiby itself', (tap) => {
wiby.validate({})
const normalizedConfig = wiby.validate({})
tap.strictSame(normalizedConfig, {
dependents: [
{
repository: 'https://github.com/wiby-test/partial'
},
{
repository: 'git://github.com/wiby-test/fail'
},
{
repository: 'git+https://github.com/wiby-test/pass'
}
]
})
tap.end()
})

Expand Down

0 comments on commit 9acb856

Please sign in to comment.