Add tests
This commit is contained in:
@@ -19,6 +19,27 @@ test("Parses CLI output", async () => {
|
||||
expect(manifests?.length == 2);
|
||||
});
|
||||
|
||||
describe("ComponentDetection.makePackageUrl", () => {
|
||||
test("returns a empty valid package url from null object", () => {
|
||||
const packageUrl = ComponentDetection.makePackageUrl(null);
|
||||
expect(packageUrl).toBe("");
|
||||
});
|
||||
});
|
||||
|
||||
describe("ComponentDetection.makePackageUrl", () => {
|
||||
test("returns a empty valid package url from null object properties", () => {
|
||||
const packageUrl = ComponentDetection.makePackageUrl({
|
||||
Scheme: null,
|
||||
Type: null,
|
||||
Namespace: null,
|
||||
Name: null,
|
||||
Version: null,
|
||||
Qualifiers: null
|
||||
});
|
||||
expect(packageUrl).toBe("");
|
||||
});
|
||||
});
|
||||
|
||||
describe("ComponentDetection.makePackageUrl", () => {
|
||||
test("returns a valid package url from saturated object", () => {
|
||||
const packageUrl = ComponentDetection.makePackageUrl({
|
||||
|
||||
Reference in New Issue
Block a user