Contributing: Running the Test Suite #212
-
I'd love to contribute to Templater, both with internal variables/functions and functionality (I've actually fixed the dynamic templating bug #188 locally). However, I can't seem to find how to run the test suite.
How can I run the tests? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hey @andrew8088 thanks for considering contributing to Templater! |
Beta Was this translation helpful? Give feedback.
Hey @andrew8088 thanks for considering contributing to Templater!
Since we can only access the obsidian code from the obsidian app, the
main.test.js
is actually an obsidian plugin!You just have to add this file to a folder inside your vault
plugins
folder, and then runAlt+t
(default hotkey) to launch the tests.Tests results will appear in the console (
Ctrl+Shift+I
to open it)Tests are very basic for now, I need to add some more. If you feel like it, don't hesitate to add some too. I'm using the
chai
assertion library. Just look at the existing tests and follow the structure, it's pretty basic.