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

Option to merge nested mock() in test suites #379

Open
kien-ht opened this issue Sep 26, 2023 · 0 comments
Open

Option to merge nested mock() in test suites #379

kien-ht opened this issue Sep 26, 2023 · 0 comments

Comments

@kien-ht
Copy link

kien-ht commented Sep 26, 2023

Describe the problem

In case my test suites were structured like this:

describe('suite', () => {
  beforeEach(() => {
    mock({
      'path-a': 'file content a'
    })
  })

  it('test', () => {
    mock({
      'path-b': 'file content b'
    })
    ...
  })
})

Expected result

My virtual file system should contain both path-a and path-b

Actual Result

Only path-b exists

Is there any way to make this work?

@kien-ht kien-ht changed the title Option to merge mock() in nested test suites Option to merge nested mock() in test suites Sep 26, 2023
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