generate file working

pull/5370/head
Aniket-Engg 3 years ago committed by Aniket
parent b188e3e1e1
commit 5eb4521331
  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]
this.helper.createNonClashingNameWithPrefix(fileNameToImport, fileProvider, '_test', (error: any, newFile: any) => {
// 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.syncEditor(newFile)
})

Loading…
Cancel
Save