Skip to content

Commit

Permalink
Minor codestyle improvement in test
Browse files Browse the repository at this point in the history
  • Loading branch information
lumaxis authored May 30, 2024
1 parent cf45f89 commit b67935c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/providers/summary/scancode-new.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const SCANCODE_VERSIONS = ['32.1.0']
describe('ScancodeSummarizerNew basic compatability', () => {
it('summarizes basic npm', () => {
const coordinates = { type: 'npm', provider: 'npmjs' }
for (let version of SCANCODE_VERSIONS) {
for (const version of SCANCODE_VERSIONS) {
const harvestData = getHarvestData(version, 'npm-basic')
const result = summarizer.summarize(coordinates, harvestData)
assert.equal(result.licensed.declared, 'ISC', `Declared license mismatch for version ${version}`)
Expand All @@ -28,7 +28,7 @@ describe('ScancodeSummarizerNew basic compatability', () => {
it('summarizes large npm', () => {
const coordinates = { type: 'npm', provider: 'npmjs' }

for (let version of SCANCODE_VERSIONS) {
for (const version of SCANCODE_VERSIONS) {
const harvestData = getHarvestData(version, 'npm-large')
const result = summarizer.summarize(coordinates, harvestData)
assert.equal(
Expand Down Expand Up @@ -107,7 +107,7 @@ describe('ScancodeSummarizerNew basic compatability', () => {
'maven-java-jna': 'LGPL-2.1-or-later OR Apache-2.0'
}

for (let [name, declared] of Object.entries(packages)) {
for (const [name, declared] of Object.entries(packages)) {
for (const scancodeVersion of SCANCODE_VERSIONS) {
const harvestData = getHarvestData(scancodeVersion, name)
const result = summarizer.summarize(coordinates, harvestData)
Expand Down Expand Up @@ -138,7 +138,7 @@ describe('ScancodeSummarizerNew basic compatability', () => {

it('summarizes ruby gems', () => {
const coordinates = { type: 'gem', provider: 'rubygems' }
for (let version of SCANCODE_VERSIONS) {
for (const version of SCANCODE_VERSIONS) {
const harvestData = getHarvestData(version, 'gem')
const result = summarizer.summarize(coordinates, harvestData)

Expand All @@ -151,7 +151,7 @@ describe('ScancodeSummarizerNew basic compatability', () => {

it('summarizes git repos', () => {
const coordinates = { type: 'git', provider: 'github' }
for (let version of SCANCODE_VERSIONS) {
for (const version of SCANCODE_VERSIONS) {
const harvestData = getHarvestData(version, 'git')
const result = summarizer.summarize(coordinates, harvestData)
assert.equal(result.licensed.declared, 'MIT', `Declared license mismatch for version ${version}`)
Expand All @@ -164,7 +164,7 @@ describe('ScancodeSummarizerNew basic compatability', () => {

it('summarizes pythons', () => {
const coordinates = { type: 'pypi', provider: 'pypi', name: 'redis', revision: '5.0.1' }
for (let version of SCANCODE_VERSIONS) {
for (const version of SCANCODE_VERSIONS) {
const harvestData = getHarvestData(version, 'python')
const result = summarizer.summarize(coordinates, harvestData)
assert.equal(result.licensed.declared, 'MIT', `Declared license mismatch for version ${version}`)
Expand All @@ -177,7 +177,7 @@ describe('ScancodeSummarizerNew basic compatability', () => {

it('summarizes crates', () => {
const coordinates = { type: 'crate', provider: 'cratesio', name: 'rand', revision: '0.8.2' }
for (let version of SCANCODE_VERSIONS) {
for (const version of SCANCODE_VERSIONS) {
const harvestData = getHarvestData(version, 'crate-file-summary')
const result = summarizer.summarize(coordinates, harvestData)
assert.equal(
Expand Down

0 comments on commit b67935c

Please sign in to comment.