Refactored and added tests to Settings #28
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds tests for settings.
I haven't been able to find a way to mockout the Obsidian package. I spent awhile trying to get it bundled in, but I realized the only file provided in their Obsidian repo is a type file, not the actual module. So that was not the solution, then I tried creating a mock of the Obsidian repo, I made progress, but it was alot for little output, so I decided that a refactor for the settings and tests with that refactor could be helpful. I still think more test coverage is needed, and I am happy adding them if there is a solid way of getting around the Obsidian package throwing a fit.
I did also check some other repositories, it seems like most places just don't test any of the files that import from Obsidian.
I was looking off this list https://publish.obsidian.md/hub/04+-+Guides%2C+Workflows%2C+%26+Courses/Community+Talks/Plugin+Testing+for+Developers
EDIT: I just closed it, I hadn't rebased off of the master branch in a bit of a while, so this branch should be ready to merge.