()
| 65 | } |
| 66 | |
| 67 | validateActionScriptTests() { |
| 68 | const names = this.actionScriptTests.map((script) => script.name); |
| 69 | const namesSet = new Set(names); |
| 70 | if (namesSet.size !== names.length) { |
| 71 | throw new Error("All action script tests must have a unique name"); |
| 72 | } |
| 73 | |
| 74 | const actionScriptNames = new Set( |
| 75 | this.actionScripts.map((script) => script.name) |
| 76 | ); |
| 77 | const actionScriptTestNames = new Set( |
| 78 | this.actionScriptTests.map((test) => test.name) |
| 79 | ); |
| 80 | for (let scriptName of actionScriptNames) { |
| 81 | if (!actionScriptTestNames.has(scriptName)) { |
| 82 | throw new Error(`No test found for action script ${scriptName}`); |
| 83 | } |
| 84 | } |
| 85 | |
| 86 | for (const test of this.actionScriptTests) { |
| 87 | this.validateActionScriptTest(test); |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | validateActionScriptTest(actionScriptTest) { |
| 92 | for (let [field, type] of Object.entries( |
no test coverage detected