-
Notifications
You must be signed in to change notification settings - Fork 0
Does this package work? #4
Comments
I reproduced. Thanks for the report. I hadn't tried it with no arguments recently. The package does work, but I seem to have introduced a regression. |
thx, yeah adding a name parameter seemed to fix it. |
Yeah, I broke the default argument handling for |
Also, what is the best way to go about using these bson files, I get your 'before' function but, there isn't really an example of using the data in the ReadMe. Just a thought |
Just pushed 0.0.2 to atmosphere. Thanks again for the report and let me know if you have any further troubles. |
Ah, I missed your question. I'm using the fixtures to load collections that my application consumes directly. I don't access the collections in test (though I could). Do you think showing an example of adding a collection before saving and then accessing it after loading would be helpful? |
yeah that would be helpful. I guess I was under the impression that the package would actually create fixtures based on the data in the db. Sounds to me like it does more of a mongodump and then a load of that data before you run the tests? |
Exactly, though I'd like to figure out how to copy the database without those utilities. See #1.
I'm not exactly sure what you mean by "create fixtures based on the data". |
I just meant it would be great if you could create fixture.js files that you could edit as your project grew. |
Gotcha. I'm basically doing that in my app -- I have a script I'm tracking which populates my database before I save it. I guess I'm not sure what the advantage of having such scripts run by the fixtures package would be. The reason I use fixtures (rather than repopulating the database with the script on every test run) is that the script is too expensive to run every test run. In my case this sped up my test suite 10x because my script makes a bunch of remote API calls. I suppose this package could check a file for changes on every test run and then run it and do the saving automatically, but that seems like a lot of magic just to avoid running the script and |
The text was updated successfully, but these errors were encountered: