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
Generated Vendored
+2
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;
Generated Vendored
+1 -1
View File
File diff suppressed because one or more lines are too long
+2
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;
+2 -17
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);
})
File diff suppressed because it is too large Load Diff