Skip to content
New issue

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

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

Already on GitHub? # to your account

Deprecate loadFixture function #361

Closed
achingbrain opened this issue May 15, 2019 · 1 comment · Fixed by #737
Closed

Deprecate loadFixture function #361

achingbrain opened this issue May 15, 2019 · 1 comment · Fixed by #737

Comments

@achingbrain
Copy link
Member

It'd be create if we could just fs.readFileSync at the top of tests and let babel-plugin-static-fs or similar figure it out for the browser.

Not sure why we felt the need to invent our own version.

@achingbrain
Copy link
Member Author

There is this idea of loading fixtures from dependencies, as in:

loadFixture('test/foo/bar.txt', 'some-dep')

but see also: require.resolve

fs.readFileSync(require.resolve('some-dep/test/foo/bar.txt'))

@hugomrdias hugomrdias mentioned this issue Feb 23, 2021
3 tasks
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant