-
Notifications
You must be signed in to change notification settings - Fork 5
Configurable test dir #18
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
base: master
Are you sure you want to change the base?
Conversation
… in the target folder that can be checked in.
|
mmm... I like it! Can you change the package.json file in the test folder to either be blank "{}" or remove it altogether. Since the data is being supplied within the test already, it's best not to have a redundant copy. |
|
That confused me for a while. I don't know why the file exists if its contents are ignored. I'd rather NOT mock the data and access the real file than have an ignored file.. what do you think? |
|
The tests are already written with mocks in place... the file is there for the existence check. |
|
Seems like it makes sense to just read the file and skip the entire mocking step tbh, but I'll update it. |
|
The problem then is that you have to have a test file and directory for each test case. You would also then have to read each file to see what the test is actually looking for. With the tests mocked as they are currently, the tests are readable from within the test script itself instead across a variety of files. |
|
Well, if the goal is to not perform integration tests against the file system and fs module, you're probably best off mocking the entire fs portion instead of half-mocking it and having directories laying about. But that's a change for a different PR. |
|
Mmmm... now I'm not sure how to deal with the scoring on this. |
|
I'm thinking that it should probably wrapped up into one test, which checks for the existance of "directories.test" or "./test/". |
This PR includes a merge from #17 since the tests wouldn't pass without it.