Add debugging

This commit is contained in:
Justin Hutchings
2022-10-04 11:30:52 -07:00
parent 168c9a869c
commit 4bea3a0f91
5 changed files with 62335 additions and 18 deletions

2
dist/index.js generated vendored
View File

@@ -21871,6 +21871,8 @@ async function run() {
}
function getManifestFromSpdxFile(content, fileName) {
core.debug(`Processing ${fileName}`);
core.debug(`Content: ${content}`);
let manifest = new Manifest(fileName);
content.packages?.forEach(pkg => {
let packageName = pkg.packageName;

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View File

@@ -33,6 +33,8 @@ async function run() {
}
function getManifestFromSpdxFile(content, fileName) {
core.debug(`Processing ${fileName}`);
core.debug(`Content: ${content}`);
let manifest = new Manifest(fileName);
content.packages?.forEach(pkg => {
let packageName = pkg.packageName;

View File

@@ -1,24 +1,9 @@
const wait = require('./wait');
const process = require('process');
const cp = require('child_process');
const path = require('path');
test('throws invalid number', async () => {
await expect(wait('foo')).rejects.toThrow('milliseconds not a number');
});
test('wait 500 ms', async () => {
const start = new Date();
await wait(500);
const end = new Date();
var delta = Math.abs(end - start);
expect(delta).toBeGreaterThanOrEqual(500);
});
// shows how the runner will run a javascript action with env / stdout protocol
test('test runs', () => {
process.env['INPUT_MILLISECONDS'] = 100;
const ip = path.join(__dirname, 'index.js');
const result = cp.execSync(`node ${ip}`, {env: process.env}).toString();
const ip = path.join(__dirname, "dist", 'index.js');
const result = cp.execSync(`node ${ip}`, {filePath: "test"}).toString();
console.log(result);
})

62328
test/manifest.spdx.json Normal file

File diff suppressed because it is too large Load Diff