generate file working

pull/1862/head
Aniket-Engg 3 years ago committed by Aniket
parent 93af567fa9
commit 3c0ce77009
  1. 4
      libs/remix-ui/solidity-unit-testing/src/lib/logic/testTabLogic.ts

@ -49,7 +49,9 @@ export class TestTabLogic {
const fileNameToImport = (!hasCurrent) ? fileName : this.currentPath + '/' + splittedFileName[splittedFileName.length - 1] const fileNameToImport = (!hasCurrent) ? fileName : this.currentPath + '/' + splittedFileName[splittedFileName.length - 1]
this.helper.createNonClashingNameWithPrefix(fileNameToImport, fileProvider, '_test', (error: any, newFile: any) => { this.helper.createNonClashingNameWithPrefix(fileNameToImport, fileProvider, '_test', (error: any, newFile: any) => {
// if (error) return modalDialogCustom.alert('Failed to create file. ' + newFile + ' ' + error) // if (error) return modalDialogCustom.alert('Failed to create file. ' + newFile + ' ' + error)
// if (!fileProvider.set(newFile, this.generateTestContractSample(hasCurrent, fileName))) return modalDialogCustom.alert('Failed to create test file ' + newFile) const isFileCreated = fileProvider.set(newFile, this.generateTestContractSample(hasCurrent, fileName))
console.log('isFileCreated---->', isFileCreated)
// if (!isFileCreated) return modalDialogCustom.alert('Failed to create test file ' + newFile)
this.fileManager.open(newFile) this.fileManager.open(newFile)
this.fileManager.syncEditor(newFile) this.fileManager.syncEditor(newFile)
}) })

Loading…
Cancel
Save