-
Notifications
You must be signed in to change notification settings - Fork 54
Conversation
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.
Nice test approach! Looks good. Just fix the typos 👍
- Using the testing helper function to test the test helpers; That's pretty damn meta - Add testing for the error and console.log in `testUtilityPackages`
…tilities-test-coverage
…s/psammead into increase-utilities-test-coverage
|
||
describe('Psammead test helpers', () => { | ||
it('should test all the utility exports exist and are the correct type', () => { | ||
testHelpers.testUtilityPackages( |
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 will fail Jenkins and will need |
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.
Nice one 👍
a0445b6
to
3e3366c
Compare
Due to 3 out of the 4 packages being dependant on changes to the test helper package I'm going to split this PR in two. Therefore closing this PR |
Cherry pick changes to `psammead-test-helpers` from the POC PR - #224
PR 1: #258 |
PR 2: #259 |
Resolves #156
Adds a test helper method that takes an actual import and validates it has all the exported values it is expected to have. This can then be used to simplifying testing the utility packages exports
Has error handling logic for both new files (EG:
font.js
) and for exported files within those files when:I have assigned myself to this PR and the corresponding issues
Tests added for new features
Test engineer approval
To get this work merged in I'll have to split out the changes in
psammead-test-helpers
and then bump the version and publish to npm before then using the new test helper version in the other packages.That said, this PR can be tested locally by checking out this branch, then copy and paste the following command, which locally links all the necessary packages that once split out will in the future depend on
psammead-test-helpers
:Finally, see the test coverage for the whole repo increase from something in the 50's% to over 89% 🎉