Clarify variable names.

This commit is contained in:
Federico Builes
2022-06-08 15:53:14 +02:00
parent 4474253eb8
commit 25271922eb
+4 -4
View File
@@ -48,12 +48,12 @@ let rubyChange: Change = {
test('hasInvalidLicenses fails a licenses outside the allow list is found', async () => { test('hasInvalidLicenses fails a licenses outside the allow list is found', async () => {
const changes: Changes = [npmChange, rubyChange] const changes: Changes = [npmChange, rubyChange]
const result = hasInvalidLicenses(changes, ['BSD'], []) const invalidChanges = hasInvalidLicenses(changes, {allow: ['BSD']})
expect(result[0]).toBe(npmChange) expect(invalidChanges[0]).toBe(npmChange)
}) })
test('hasInvalidLicenses fails if a denied license is found', async () => { test('hasInvalidLicenses fails if a denied license is found', async () => {
const changes: Changes = [npmChange, rubyChange] const changes: Changes = [npmChange, rubyChange]
const result = hasInvalidLicenses(changes, [], ['BSD']) const invalidChanges = hasInvalidLicenses(changes, {deny: ['BSD']})
expect(result[0]).toBe(rubyChange) expect(invalidChanges[0]).toBe(rubyChange)
}) })