(source, name)
| 46 | return directory; |
| 47 | } |
| 48 | function workflowScript(source, name) { |
| 49 | const lines = source.split("\n"); |
| 50 | const step = lines.findIndex((line) => line.trim() === `- name: ${name}`); |
| 51 | assert.ok(step >= 0, `${name} step exists`); |
| 52 | const run = lines.findIndex( |
| 53 | (line, index) => index > step && line === " run: |", |
| 54 | ); |
| 55 | assert.ok(run > step, `${name} shell body exists`); |
| 56 | const body = []; |
| 57 | for (let index = run + 1; index < lines.length; index++) { |
| 58 | if (lines[index] && !lines[index].startsWith(" ")) break; |
| 59 | body.push(lines[index].slice(10)); |
| 60 | } |
| 61 | return body.join("\n"); |
| 62 | } |
| 63 | test("legacy workflow archive steps retain executable names and complete terms", (t) => { |
| 64 | const license = readFileSync(new URL("../../LICENSE", import.meta.url)); |
| 65 | const notice = readFileSync(new URL("../../NOTICE", import.meta.url)); |
no test coverage detected