MCPcopy Index your code
hub / github.com/codecombat/codecombat / addAce

Method addAce

app/views/artisans/BlockTestingView.js:173–187  ·  view source on GitHub ↗
({ testCase, testContainer })

Source from the content-addressed store, hash-verified

171 }
172
173 addAce ({ testCase, testContainer }) {
174 const aces = { input: null, output: null }
175 for (const key in aces) {
176 const ace = aceLib.edit(testContainer.find(`.ace-${key}`)[0])
177 this.configureAce(ace, testCase.codeLanguage)
178 if (key === 'input') {
179 ace.setValue(testCase.code)
180 ace.clearSelection()
181 } else {
182 ace.setReadOnly(true)
183 }
184 aces[key] = ace
185 }
186 return { inputAce: aces.input, outputAce: aces.output }
187 }
188
189 addBlockly ({ testCase, testContainer, inputAce, outputAce }) {
190 // Initialize Blockly

Callers 1

addTestCasesMethod · 0.95

Calls 2

configureAceMethod · 0.95
clearSelectionMethod · 0.80

Tested by

no test coverage detected