Add debugging
This commit is contained in:
+2
@@ -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;
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -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
@@ -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
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user