Skip to content

Commit

Permalink
Fix previously broken test
Browse files Browse the repository at this point in the history
  • Loading branch information
lumaxis committed Jan 18, 2024
1 parent 4ae722e commit d1c29be
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion providers/summary/scancode.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class ScanCodeSummarizer {
return SPDX.normalize(declared_license)
}
default:
throw new Error(`Invalid version of scancode: ${scancodeVersion}`)
throw new Error(`Invalid version of ScanCode: ${scancodeVersion}`)
}
}

Expand Down
6 changes: 3 additions & 3 deletions test/fixtures/scancode/0.0.0/npm-basic.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@
"fetchedAt": "2018-02-27T20:03:11.607Z",
"links": {
"self": {
"href": "urn:npm:npmjs:-:glob:revision:7.1.2:tool:scancode:2.2.1",
"href": "urn:npm:npmjs:-:glob:revision:7.1.2:tool:scancode:0.0.0",
"type": "resource"
},
"siblings": {
"href": "urn:npm:npmjs:-:glob:revision:7.1.2:tool:scancode",
"type": "collection"
}
},
"version": "2.2.1",
"version": "0.0.0",
"contentType": "application/json",
"releaseDate": "2017-05-19T20:15:25.471Z",
"processedAt": "2018-02-27T20:05:25.944Z"
},
"content": {
"scancode_notice": "Generated with ScanCode and provided on an \"AS IS\" BASIS, WITHOUT WARRANTIES\nOR CONDITIONS OF ANY KIND, either express or implied. No content created from\nScanCode should be considered or used as legal advice. Consult an Attorney\nfor any legal advice.\nScanCode is a free software code scanning tool from nexB Inc. and others.\nVisit https://github.com/nexB/scancode-toolkit/ for support and download.",
"scancode_version": "2.2.1",
"scancode_version": "0.0.0",
"scancode_options": {
"--copyright": true,
"--license": true,
Expand Down
3 changes: 1 addition & 2 deletions test/providers/summary/scancode.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,8 @@ describe('ScancodeSummarizer basic compatability', () => {
const harvestData = getHarvestData(version, 'npm-basic')
try {
summarizer.summarize(coordinates, harvestData)
throw new Error('Invalid version of ScanCode')
} catch (error) {
expect(error.message).to.eq('Invalid version of ScanCode')
expect(error.message).to.eq(`Invalid version of ScanCode: ${version}`)
}
})

Expand Down

0 comments on commit d1c29be

Please sign in to comment.