default test path optimization

pull/1864/head^2
aniket-engg 3 years ago committed by Aniket
parent dd38c66120
commit 2a3a32fc3a
  1. 2
      apps/remix-ide/src/app/tabs/test-tab.js
  2. 6
      libs/remix-ui/solidity-unit-testing/src/lib/solidity-unit-testing.tsx

@ -133,7 +133,7 @@ module.exports = class TestTab extends ViewPlugin {
render () { render () {
this.onActivationInternal() this.onActivationInternal()
this.renderComponent() this.renderComponent('tests')
return this.element return this.element
} }

@ -21,7 +21,6 @@ export const SolidityUnitTesting = (props: Record<string, any>) => {
const { helper, testTab, initialPath } = props const { helper, testTab, initialPath } = props
const { testTabLogic } = testTab const { testTabLogic } = testTab
const [defaultPath, setDefaultPath] = useState('tests')
const [toasterMsg, setToasterMsg] = useState('') const [toasterMsg, setToasterMsg] = useState('')
const [disableCreateButton, setDisableCreateButton] = useState(true) const [disableCreateButton, setDisableCreateButton] = useState(true)
@ -52,7 +51,7 @@ export const SolidityUnitTesting = (props: Record<string, any>) => {
const selectedTests: any = useRef([]) const selectedTests: any = useRef([])
const currentErrors: any = useRef([]) const currentErrors: any = useRef([])
const defaultPath = 'tests'
let areTestsRunning = false let areTestsRunning = false
let runningTestFileName: any let runningTestFileName: any
@ -115,9 +114,6 @@ export const SolidityUnitTesting = (props: Record<string, any>) => {
}, [initialPath]) // eslint-disable-line react-hooks/exhaustive-deps }, [initialPath]) // eslint-disable-line react-hooks/exhaustive-deps
useEffect(() => { useEffect(() => {
updateDirList('/')
updateForNewCurrent()
testTab.on('filePanel', 'newTestFileCreated', async (file: string) => { testTab.on('filePanel', 'newTestFileCreated', async (file: string) => {
try { try {
testTabLogic.getTests((error: any, tests: any) => { testTabLogic.getTests((error: any, tests: any) => {

Loading…
Cancel
Save