Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Ability to set beforeEach and AfterEach statments #19

Open
reggi opened this issue Jul 30, 2015 · 1 comment
Open

Feature Request: Ability to set beforeEach and AfterEach statments #19

reggi opened this issue Jul 30, 2015 · 1 comment

Comments

@reggi
Copy link

reggi commented Jul 30, 2015

The async capabilities are super nice.

 * @example
 * symlinkPath("./foo.txt", "./dir-foo/symlink.txt", cb)
 * // async => "./foo.txt"

I just need the ability to add in a file-system mock and I'd be golden.

var mock = require('mock-fs')
beforeEach(function(){
    mock({
      'foo.txt': 'foo\n',
      'empty-dir': {},
      'dir-foo': {
        'foo.txt': 'foo\n',
      },
      'dir-bar': {
        'bar.txt': 'bar\n',
      },
    })
  })

  afterEach(function() {
    mock.restore()
  })
@reggi
Copy link
Author

reggi commented Jul 30, 2015

At this point I'd just appreciate any way of writing tests easier.

@reggi reggi changed the title Feature Request: Ability to set beforeAll and AfterAll statments Feature Request: Ability to set beforeEach and AfterEach statments Jul 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant