-
Notifications
You must be signed in to change notification settings - Fork 11
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
Tests/setup #17
base: master
Are you sure you want to change the base?
Tests/setup #17
Conversation
Totally. Writing test for all shims would be awesome. Between child, job and teaching I find little time for fun coding projects 😞 Take a look at this file If you start adding test for some shims in that way we will be done in notime |
@lumenn If you start here, there are two different kinds of tests here. The file In the end we should have one file where all local tests are combined so we can run them in one call. The other ones like It would be perfect if we can use the same files for local and CI testing but I still have to do some work on the assertion framework. My idea is to implement a subset of the jest commands so we can run them in both frameworks. Anyway. If you start writing test look at |
I'll jump on it today, thanks for directions |
Whole Array is now covered, those are simple tests, if we need to make them more specific, let me know, and i'll update those. Give me some feedback on those and, if those are fine, then maybe i'll jump to another functions. |
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.
Everything awesome except for this new function in the assertions.js
@@ -33,6 +33,16 @@ function expect(actual) { | |||
throw new Error(actual + " is not equal to " + expected); | |||
} | |||
}, | |||
toEqualArray: function(expected) { |
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.
Is this function taken from jest source?
Would be good if we not introduce new functions. This would allow to use jest on the CI server.
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.
No, it's one i wrote.
Current functions don't allow to compare arrays, so that's how this one ended up here.
We should only stick to those 4 functions we already have?
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.
Nope. My master plan is to write only functions jest also understands. So we can have tests running on Adobe products and also on CI server.
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.
https://repl.it/repls/NormalEmptyClicks
It seems that we should correct our implementation of toEqual, as in jest it can easily compare arrays. Testing our implementation in InDesign doesn't pass.
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.
Totally. I just hacked that together. Really needs some love. :) Maybe I'll find some space at the weekend for it
Add assertion helpers