Clarify license tests.

This commit is contained in:
Federico Builes
2022-06-06 20:32:46 +02:00
parent dc7b0a2788
commit 1261e18905
+7 -1
View File
@@ -46,8 +46,14 @@ let rubyChange: Change = {
]
}
test('hasInvalidLicenses fails if an unallowed license is found', async () => {
test('hasInvalidLicenses fails a licenses outside the allow list is found', async () => {
const changes: Changes = [npmChange, rubyChange]
const result = hasInvalidLicenses(changes, ['BSD'], [])
expect(result[0]).toBe(npmChange)
})
test('hasInvalidLicenses fails if a denied license is found', async () => {
const changes: Changes = [npmChange, rubyChange]
const result = hasInvalidLicenses(changes, [], ['BSD'])
expect(result[0]).toBe(rubyChange)
})