Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix previously broken test #1022

Merged
merged 1 commit into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading