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
Init Tests #623
Init Tests #623
Conversation
This patch propouse use the mocha for testing MagicMirror.
Does this mean you're going to work on a full test suite? |
Hi @MichMich I've interest a work in a test suite for MagicMirror. I think is somethings we need. I can do develop somes tests. This patch propose the use mocha for the test suite. I would like to hear comments and if we can work a list set of test to do. |
Honestly, I don't have much experience with writing test. This would be a nice project to learn more. |
We can invite to users in forums. I think is really important define the test list for will do. The test suite is a little big work, isn't something we can do it in one day or week. |
One of the changes in 3a8d72d introduces an error in the client.
|
I see. Let me check how prevent this. If you have any suggest or aprouch is welcome :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check my comments on how to fix this.
@@ -415,3 +415,7 @@ Module.register = function (name, moduleDefinition) { | |||
Log.log("Module registered: " + name); | |||
Module.definitions[name] = moduleDefinition; | |||
}; | |||
|
|||
exports._test = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that you would do this instead:
module.exports = {
cmpVersions: cmpVersions
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't work :(. I sent a new Pull Request with a hotfix. Can you review @nhubbard and @qistoph this?
Also, I add a post for create a set list of test for the suite.
https://forum.magicmirror.builders/topic/1456/test-suite-for-magicmirror
I would really like have your comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR #633 removed the error for me and npm test
works. Seems like a good solution to me.
Also noticed a minor textual improvement in tests/functions/compare-version.js
:
"Test function ... into ..." could better be "Test function ... in ...".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I pushed the textual change.
No description provided.