import { exec } from 'child_process'

// test/mock
// ├── empty
// ├── file1.jsx
// ├── file2.jsx
// └── inner
//     ├── deep
//     │   ├── file6.js
//     │   └── file7.jsx
//     ├── file3.txt
//     ├── file4.jsx
//     └── file5.js

function createTestDirectory (cb) {
  exec('mkdir -p test/mock && touch test/mock/file1.jsx ' +
        '&& touch test/mock/file2.jsx && mkdir -p test/mock/empty ' +
        '&& mkdir -p test/mock/inner && touch test/mock/inner/file3.txt ' +
        '&& touch test/mock/inner/file4.jsx && ' +
        'touch test/mock/inner/file5.js && ' +
        'mkdir test/mock/inner/deep && ' +
        'touch test/mock/inner/deep/file6.js &&' +
        'touch test/mock/inner/deep/file7.jsx ', (err, stdout, stderr) => {
    if (err) {
      console.log('Child process exited with error code', err)
      return
    }
    // console.log(stdout)
    if (cb) cb()
  })
}

function removeTestDirectory (cb) {
  exec('rm -rf test/mock', (err, stdout, stderr) => {
    if (err) {
      console.log('Child process exited with error code', err)
      return
    }
    // console.log(stdout)
    if (cb) cb()
  })
}

function findTestDirectory (cb) {
  exec('find test/mock', (err, stdout, stderr) => {
    if (err) {
      console.log('Child process exited with error code', err)
      return
    }
    // console.log(stdout)
    if (cb) cb(stdout)
  })
}

export {
  createTestDirectory,
  findTestDirectory,
  removeTestDirectory,
}

@@ -120,16 +120,102 @@
 %E2%94%80%E2%94%80 deep%0A
+//     %E2%94%82%C2%A0%C2%A0 %E2%94%9C%E2%94%80%E2%94%80 do-not-touch%0A//     %E2%94%82%C2%A0%C2%A0 %E2%94%82%C2%A0%C2%A0 %E2%94%9C%E2%94%80%E2%94%80 file8.jsx%0A//     %E2%94%82%C2%A0%C2%A0 %E2%94%82%C2%A0%C2%A0 %E2%94%94%E2%94%80%E2%94%80 file9.jsx%0A
 //     %E2%94%82
@@ -798,16 +798,205 @@
 le7.jsx 
+&&' +%0A        'mkdir -p test/mock/inner/deep/do-not-touch && ' +%0A        'touch test/mock/inner/deep/do-not-touch/file8.jsx &&' +%0A        'touch test/mock/inner/deep/do-not-touch/file9.jsx 
 ', (err,

Add another folder to test directory