Closed LeoDog896 closed 1 year ago
Looked into this a few times, thanks to learning about ways to do it from some other projects I've been working with recently (jsmediatags). Here's a look at what's coming up!
Up until now, I've been running the reader and writer functions from NBTify over various files with different format type options, which has helped check if the current code is up to handling each of the formats specifically.
Since the actual implementations weren't done yet for each format, having tests for each one wouldn't be as helpful quite yet, since I still had to add the logic itself to manage each of these. Now that NBTify has proven to work well with all of these formats, now it's a great time to set up tests for each of the formats, as I can ensure that the existing behavior will be maintained automatically, without having to manually check the results for each one myself.
Also, the original ./test/index.ts
file wasn't solely for checking if things were working right (well, they were partially for that), but it was also to track how NBTify actually outputs and works with it's data. I was using it to decide how the library should work as a whole, not only to check if it's working right (because it inherently wasn't yet).
Create proper unit tests with Jest instead of using a browser test.