Document unwanted behavior for a future refactoring.

This commit is contained in:
Federico Builes
2022-06-13 20:04:39 +02:00
parent 21412fec7b
commit fe78920139

View File

@@ -57,3 +57,14 @@ test('it fails if a license inside the deny list is found', async () => {
const invalidChanges = getDeniedLicenseChanges(changes, {deny: ['BSD']})
expect(invalidChanges[0]).toBe(rubyChange)
})
// This is more of a "here's a behavior that might be surprising" than an actual
// thing we want in the system. Please remove this test after refactoring.
test('it fails all license checks when allow is provided an empty array', async () => {
const changes: Changes = [npmChange, rubyChange]
let invalidChanges = getDeniedLicenseChanges(changes, {
allow: [],
deny: ['BSD']
})
expect(invalidChanges.length).toBe(2)
})