()
| 144 | } |
| 145 | |
| 146 | addTestCases () { |
| 147 | this.render() |
| 148 | const testCasesContainer = this.$el.find('#test-cases-container') |
| 149 | for (let i = this.testSkip; i < testCases.length && (this.focusTest || (i - this.testSkip < this.testLimit)); ++i) { |
| 150 | const testCase = testCases[i] |
| 151 | if (this.focusTest) { |
| 152 | if (this.focusTest === testCase.name) { |
| 153 | testCase.focused = true |
| 154 | } else { |
| 155 | continue |
| 156 | } |
| 157 | } |
| 158 | if (this.focusLanguage && this.focusLanguage !== testCase.codeLanguage) { |
| 159 | continue |
| 160 | } |
| 161 | |
| 162 | const testCaseHtml = testTemplate({ testCaseIndex: i, testCase }) |
| 163 | let testContainer = $(testCaseHtml) |
| 164 | testContainer.appendTo(testCasesContainer) |
| 165 | testContainer = testCasesContainer.find('.test-case:last-child') |
| 166 | testCase.code = testCase.code.trim() |
| 167 | testCase.key = `${testCase.name}_${testCase.codeLanguage}_${hashString(testCase.code)}` |
| 168 | const { inputAce, outputAce } = this.addAce({ testCase, testContainer }) |
| 169 | _.defer(() => this.addBlockly({ testCase, testContainer, inputAce, outputAce })) |
| 170 | } |
| 171 | } |
| 172 | |
| 173 | addAce ({ testCase, testContainer }) { |
| 174 | const aces = { input: null, output: null } |
no test coverage detected