UNPKG

auditjs

Version:

Audit dependencies to identify known vulnerabilities and maintenance problems

80 lines 2.91 kB
"use strict"; /* * Copyright 2019-Present Sonatype Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.ossIndexServerResults = exports.applicationInternalIdResponse = exports.ossIndexObjectNoVulnerabilities = exports.ossIndexObject = void 0; const chai_1 = __importDefault(require("chai")); const chai_as_promised_1 = __importDefault(require("chai-as-promised")); require("mocha"); const OssIndexServerResult_1 = require("../Types/OssIndexServerResult"); chai_1.default.use(chai_as_promised_1.default); const expect = chai_1.default.expect; exports.ossIndexObject = new OssIndexServerResult_1.OssIndexServerResult({ coordinates: 'Test', reference: 'reference', vulnerabilities: [ { id: 'test_id', title: 'title', cvssScore: '9.8', reference: 'reference', description: '', cvssVector: '', cve: '9.8', }, { id: 'test_id2', title: 'title', cvssScore: '9.8', reference: 'reference', description: '', cvssVector: '', cve: '9.8', }, ], }); exports.ossIndexObjectNoVulnerabilities = new OssIndexServerResult_1.OssIndexServerResult({ coordinates: 'Test', reference: 'reference', vulnerabilities: [], }); exports.applicationInternalIdResponse = { statusCode: 200, body: { applications: [ { id: '4bb67dcfc86344e3a483832f8c496419', publicId: 'testapp', name: 'TestApp', organizationId: 'bb41817bd3e2403a8a52fe8bcd8fe25a', contactUserName: 'NewAppContact', applicationTags: [ { id: '9beee80c6fc148dfa51e8b0359ee4d4e', tagId: 'cfea8fa79df64283bd64e5b6b624ba48', applicationId: '4bb67dcfc86344e3a483832f8c496419', }, ], }, ], }, }; exports.ossIndexServerResults = [exports.ossIndexObjectNoVulnerabilities, exports.ossIndexObject]; exports.default = expect; //# sourceMappingURL=TestHelper.js.map