Skip to content

Commit

Permalink
Merge pull request #1022 from lumaxis/fix-broken-test
Browse files Browse the repository at this point in the history
Fix previously broken test
  • Loading branch information
lumaxis authored Jan 29, 2024
2 parents 4ae722e + d1c29be commit 04e1794
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 04e1794

Please sign in to comment.