import expect from 'expect'
import mock from 'mock-fs'
import Traverser from '../src/traverser'


mock({
  'path/to/fake/dir': {
    'some-file.txt': 'file content here',
    'empty-dir': {/** empty directory */},
  },
  'path/to/some.png': new Buffer([8, 6, 7, 5, 3, 0, 9]),
  'some/other/path': {/** another empty directory */},
})

describe('Traverse', () => {

  it('should exist', () => {

    const excludes = new Set()

    excludes.add('node_modules')
    excludes.add('.git')

    const traverser = new Traverser(excludes, 'path/to/fake/dir')
    traverser.traverse()

    expect(traverser).toExist()
  })

  after(() => {
    mock.restore()
  })

  it('should pass', () => {
    expect(true).toExist()
  })

})

@@ -94,16 +94,83 @@
 r'%0A%0A
-%0A
+describe('Traverse', () =%3E %7B%0A%0A  it('should exist', () =%3E %7B%0A%0A    
 mock(%7B%0A
+    
   'p
@@ -189,16 +189,20 @@
 dir': %7B%0A
+    
     'som
@@ -239,16 +239,20 @@
 e',%0A    
+  
+  
 'empty-d
@@ -286,13 +286,21 @@
 /%7D,%0A
+    
   %7D,%0A
+    
   'p
@@ -352,16 +352,20 @@
 0, 9%5D),%0A
+    
   'some/
@@ -415,70 +415,14 @@
 /%7D,%0A
-%7D)%0A%0Adescribe('Traverse', () =%3E %7B%0A%0A  it('should exist', () =%3E %7B
+    %7D)
 %0A%0A  
@@ -644,49 +644,8 @@
 %7D)%0A%0A
-  after(() =%3E %7B%0A    mock.restore()%0A  %7D)%0A%0A
   it
@@ -701,11 +701,52 @@
 )%0A  %7D)%0A%0A
+  after(() =%3E %7B%0A    mock.restore()%0A  %7D)%0A%0A
 %7D)%0A

move mock definition into test body