Skip to content

Commit

Permalink
tests: prefix suites (#1174)
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Kowalleck <[email protected]>
  • Loading branch information
jkowalleck authored Nov 16, 2024
1 parent 4720d1d commit fba061a
Show file tree
Hide file tree
Showing 54 changed files with 57 additions and 57 deletions.
2 changes: 1 addition & 1 deletion tests/functional/Enums.ComponentScope.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const {
_Resources: { FILES: { CDX: { JSON_SCHEMA: CDX_JSON_SCHEMA } } }
} = require('../../')

suite('ComponentScope enum', () => {
suite('functional: ComponentScope enum', () => {
const specVersions = new Set([
Version.v1dot6,
Version.v1dot5,
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/Enums.ComponentType.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const {
_Resources: { FILES: { CDX: { JSON_SCHEMA: CDX_JSON_SCHEMA } } }
} = require('../../')

suite('ComponentType enum', () => {
suite('functional: ComponentType enum', () => {
const specVersions = new Set([
Version.v1dot6,
Version.v1dot5,
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/Enums.ExternalReferenceType.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const {
_Resources: { FILES: { CDX: { JSON_SCHEMA: CDX_JSON_SCHEMA } } }
} = require('../../')

suite('ExternalReferenceType enum', () => {
suite('functional: ExternalReferenceType enum', () => {
const specVersions = new Set([
Version.v1dot6,
Version.v1dot5,
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/Enums.HashAlogorithms.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const {
_Resources: { FILES: { CDX: { JSON_SCHEMA: CDX_JSON_SCHEMA } } }
} = require('../../')

suite('HashAlgorithm enum', () => {
suite('functional: HashAlgorithm enum', () => {
const specVersions = new Set([
Version.v1dot6,
Version.v1dot4,
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/Enums.LicenseAcknowledgement.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const {
_Resources: { FILES: { CDX: { JSON_SCHEMA: CDX_JSON_SCHEMA } } }
} = require('../../')

suite('LicenseAcknowledgement enum', () => {
suite('functional: LicenseAcknowledgement enum', () => {
const specVersions = new Set([
Version.v1dot6
])
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/Enums.LifecyclePhase.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const {
_Resources: { FILES: { CDX: { JSON_SCHEMA: CDX_JSON_SCHEMA } } }
} = require('../../')

suite('LifecyclePhase enum', () => {
suite('functional: LifecyclePhase enum', () => {
const specVersions = new Set([
Version.v1dot6,
Version.v1dot5
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/Enums.Vulnerability.AffectStatus.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const {
_Resources: { FILES: { CDX: { JSON_SCHEMA: CDX_JSON_SCHEMA } } }
} = require('../../')

suite('Vulnerability.AffectStatus enum', () => {
suite('functional: Vulnerability.AffectStatus enum', () => {
const specVersions = new Set([
Version.v1dot6,
Version.v1dot5,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const {
_Resources: { FILES: { CDX: { JSON_SCHEMA: CDX_JSON_SCHEMA } } }
} = require('../../')

suite('Vulnerability.AnalysisJustification enum', () => {
suite('functional: Vulnerability.AnalysisJustification enum', () => {
const specVersions = new Set([
Version.v1dot6,
Version.v1dot5,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const {
_Resources: { FILES: { CDX: { JSON_SCHEMA: CDX_JSON_SCHEMA } } }
} = require('../../')

suite('Vulnerability.AnalysisResponse enum', () => {
suite('functional: Vulnerability.AnalysisResponse enum', () => {
const specVersions = new Set([
Version.v1dot6,
Version.v1dot5,
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/Enums.Vulnerability.AnalysisState.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const {
_Resources: { FILES: { CDX: { JSON_SCHEMA: CDX_JSON_SCHEMA } } }
} = require('../../')

suite('Vulnerability.AnalysisState enum', () => {
suite('functional: Vulnerability.AnalysisState enum', () => {
const specVersions = new Set([
Version.v1dot6,
Version.v1dot5,
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/Enums.Vulnerability.RatingMethod.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const {
_Resources: { FILES: { CDX: { JSON_SCHEMA: CDX_JSON_SCHEMA } } }
} = require('../../')

suite('Vulnerability.RatingMethod enum', () => {
suite('functional: Vulnerability.RatingMethod enum', () => {
const specVersions = new Set([
Version.v1dot6,
Version.v1dot5,
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/Enums.Vulnerability.Severity.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const {
_Resources: { FILES: { CDX: { JSON_SCHEMA: CDX_JSON_SCHEMA } } }
} = require('../../')

suite('Vulnerability.Severity enum', () => {
suite('functional: Vulnerability.Severity enum', () => {
const specVersions = new Set([
Version.v1dot6,
Version.v1dot5,
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/Resources.node.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const {
Spec: { Version }
} = require('../../')

suite('Resources', () => {
suite('functional: Resources', () => {
suite('expected dirs', () => {
[
Resources.ROOT
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/SPDX.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const { spdxSpecEnum } = require('../_data/spdx')

const { SPDX } = require('../../')

suite('isSupportedSpdxId()', () => {
suite('functional: SPDX.isSupportedSpdxId()', () => {
/** @type {string[]} knownSpdxIds */
const knownSpdxIds = Object.freeze([
...spdxSpecEnum
Expand All @@ -39,7 +39,7 @@ suite('isSupportedSpdxId()', () => {
})
})

suite('fixupSpdxId()', () => {
suite('functional: SPDX.fixupSpdxId()', () => {
const expectedFixed = new Map([
...spdxSpecEnum.map(v => [v, v]),
...spdxSpecEnum.map(v => [v.toLowerCase(), v]),
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/Spec.SpecVersionDict.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const {
Spec: { SpecVersionDict, Version }
} = require('../../')

suite('SpecVersionDict', () => {
suite('functional: Spec.SpecVersionDict', () => {
Object.entries(SpecVersionDict).forEach(([key, spec]) =>
suite(`key: ${key}`, () => {
test('key is well-known version', () =>
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/Validation.JsonValidator.node.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ before(function () {
}
})

suite('Validation.JsonValidator functional', function () {
suite('functional: Validation.JsonValidator functional', function () {
this.timeout(60000);

[
Expand Down Expand Up @@ -65,7 +65,7 @@ suite('Validation.JsonValidator functional', function () {
})
})

suite('Validation.JsonStrictValidator functional', function () {
suite('functional: Validation.JsonStrictValidator functional', function () {
this.timeout(60000);

[
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/Validation.XmlValidator.node.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ before(function () {
}
})

suite('Validation.XmlValidator functional', function () {
suite('functional: Validation.XmlValidator functional', function () {
this.timeout(60000);

[
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/helpers.sortable.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const { suite, test } = require('mocha')

const { SortableStringables, SortableNumbers, SortableComparables } = require('../../dist.node/_helpers/sortable')

suite('helpers.sortable', () => {
suite('functional: helpers.sortable', () => {
suite('SortableStringables', () => {
test('sorted()', () => {
const obj = { toString: () => 'bar' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const {
Spec: { Version }
} = require('../../../')

suite('internals: OpPlug.node.jsonValidator implementation', () => {
suite('functional: internals: OpPlug.node.jsonValidator implementation', () => {
for (const impl of ['ajv']) {
suite(impl, () => {
let makeValidator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const {
const { default: makeValidator } = require('../../../dist.node/_optPlug.node/jsonValidator')
const { OptPlugError } = require('../../../dist.node/_optPlug.node/errors')

suite('internals: OpPlug.node.jsonValidator auto', () => {
suite('functional: internals: OpPlug.node.jsonValidator auto', () => {
if (makeValidator.fails) {
test('call should fail/throw', () => {
assert.throws(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Copyright (c) OWASP Foundation. All Rights Reserved.
const assert = require('assert')
const { suite, test, before } = require('mocha')

suite('internals: OpPlug.node.xmlStringify implementation', () => {
suite('functional: internals: OpPlug.node.xmlStringify implementation', () => {
for (const impl of ['xmlbuilder2']) {
suite(impl, () => {
let xmlStringify
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const { suite, test } = require('mocha')
const { default: xmlStringify } = require('../../../dist.node/_optPlug.node/xmlStringify')
const { OptPlugError } = require('../../../dist.node/_optPlug.node/errors')

suite('internals: OpPlug.node.xmlStringify auto', () => {
suite('functional: internals: OpPlug.node.xmlStringify auto', () => {
if (xmlStringify.fails) {
test('call should fail/throw', () => {
assert.throws(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const { pathToFileURL } = require('url')
const { realpathSync } = require('fs')
const { join } = require('path')

suite('internals: OpPlug.node.xmlValidator implementation', () => {
suite('functional: internals: OpPlug.node.xmlValidator implementation', () => {
for (const impl of ['libxmljs2']) {
suite(impl, () => {
let makeValidator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const {
const { default: makeValidator } = require('../../../dist.node/_optPlug.node/xmlValidator')
const { OptPlugError } = require('../../../dist.node/_optPlug.node/errors')

suite('internals: OpPlug.node.xmlValidator auto', () => {
suite('functional: internals: OpPlug.node.xmlValidator auto', () => {
if (makeValidator.fails) {
test('call should fail/throw', () => {
assert.throws(
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/packageManifestExports.node.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const { suite, test } = require('mocha')

const CDX = require('../../')

suite('packageManifest:exports', () => {
suite('functional: packageManifest:exports', () => {
const pjPath = join(__dirname, '..', '..', 'package.json')
const { exports: pjExports } = JSON.parse(readFileSync(pjPath))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const {
Builders: { FromNodePackageJson: { ComponentBuilder } }
} = require('../../')

suite('Builders.FromNodePackageJson.ComponentBuilder', () => {
suite('integration: Builders.FromNodePackageJson.ComponentBuilder', () => {
const salt = Math.random()

const extRefFactory = new Factories.FromNodePackageJson.ExternalReferenceFactory()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const {
Builders: { FromNodePackageJson: { ToolBuilder } }
} = require('../../')

suite('Builders.FromNodePackageJson.ToolBuilder', () => {
suite('integration: Builders.FromNodePackageJson.ToolBuilder', () => {
const salt = Math.random()

const extRefFactory = new Factories.FromNodePackageJson.ExternalReferenceFactory()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const {
Factories: { FromNodePackageJson: { ExternalReferenceFactory } }
} = require('../../')

suite('Factories.FromNodePackageJson.ExternalReferenceFactory', () => {
suite('integration: Factories.FromNodePackageJson.ExternalReferenceFactory', () => {
const sut = new ExternalReferenceFactory()

suite('from "homepage"', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const {
Factories: { FromNodePackageJson: { PackageUrlFactory } }
} = require('../../')

suite('Factories.FromNodePackageJson.PackageUrlFactory', () => {
suite('integration: Factories.FromNodePackageJson.PackageUrlFactory', () => {
const salt = Math.random()

const sut = new PackageUrlFactory('testing')
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/Factories.LicenseFactory.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const {
Models: { LicenseExpression, NamedLicense, SpdxLicense }
} = require('../../')

suite('Factories.LicenseFactory', () => {
suite('integration: Factories.LicenseFactory', () => {
test('makeFromString() -> LicenseExpression', () => {
const sut = new LicenseFactory()
const expression = '(MIT OR Apache-2.0)'
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/Factories.PackageUrlFactory.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const {
Factories: { PackageUrlFactory }
} = require('../../')

suite('Factories.PackageUrlFactory', () => {
suite('integration: Factories.PackageUrlFactory', () => {
const salt = Math.random()

const sut = new PackageUrlFactory('testing')
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/Serialize.JsonNormalize.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const {
Spec
} = require('../../')

describe('Serialize.JsonNormalize', function () {
describe('integration.Serialize.JsonNormalize', function () {
this.timeout(60000);

[
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/Serialize.JsonSerialize.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const {
}
} = require('../../')

describe('Serialize.JsonSerialize', function () {
describe('integration.Serialize.JsonSerialize', function () {
this.timeout(60000);

Object.entries({
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/Serialize.XmlNormalize.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const {
Spec
} = require('../../')

describe('Serialize.XmlNormalize', function () {
describe('integration.Serialize.XmlNormalize', function () {
this.timeout(60000);

[
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/Serialize.XmlSerialize.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const {

const { default: xmlStringify } = require('../../dist.node/_optPlug.node/xmlStringify')

describe('Serialize.XmlSerialize', function () {
describe('integration.Serialize.XmlSerialize', function () {
const expectMissingDepError = xmlStringify.fails ?? false

this.timeout(60000);
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/Validation.JsonStrictValidator.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const {

const { default: jsonValidator } = require('../../dist.node/_optPlug.node/jsonValidator')

describe('Validation.JsonStrictValidator', () => {
describe('integration.Validation.JsonStrictValidator', () => {
const expectMissingDepError = jsonValidator.fails ?? false;

[
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/Validation.JsonValidator.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const {

const { default: jsonValidator } = require('../../dist.node/_optPlug.node/jsonValidator')

describe('Validation.JsonValidator', () => {
describe('integration.Validation.JsonValidator', () => {
const expectMissingDepError = jsonValidator.fails ?? false;

[
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/Validation.XmlValidator.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const {

const { default: xmlValidator } = require('../../dist.node/_optPlug.node/xmlValidator')

describe('Validation.XmlValidator', () => {
describe('integration.Validation.XmlValidator', () => {
const expectMissingDepError = xmlValidator.fails ?? false;

[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const {
}
} = require('../../')

suite('Builders.FromNodePackageJson.ComponentBuilder', () => {
suite('unit: Builders.FromNodePackageJson.ComponentBuilder', () => {
test('construct', () => {
const extRefFactory = new ExternalReferenceFactory()
const licenseFactory = new LicenseFactory()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const {
Factories: { FromNodePackageJson: { ExternalReferenceFactory } }
} = require('../../')

suite('Builders.FromNodePackageJson.ToolBuilder', () => {
suite('unit: Builders.FromNodePackageJson.ToolBuilder', () => {
test('construct', () => {
const extRefFactory = new ExternalReferenceFactory()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const {
Models: { Component, ExternalReference, ExternalReferenceRepository }
} = require('../../')

suite('Factories.FromNodePackageJson.PackageUrlFactory', () => {
suite('unit: Factories.FromNodePackageJson.PackageUrlFactory', () => {
suite('makeFromComponent()', () => {
test('plain', () => {
const component = new Component(ComponentType.Library, 'testing')
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/Factories.PackageUrlFactory.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const {

const { randomString } = require('../_helpers/stringFunctions')

suite('Factories.PackageUrlFactory', () => {
suite('unit: Factories.PackageUrlFactory', () => {
test('construct', () => {
const type = randomString(5)

Expand Down
Loading

0 comments on commit fba061a

Please sign in to comment.