-
Notifications
You must be signed in to change notification settings - Fork 5
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
Cache helper test + eslint update #1025
Conversation
Codecov Report
@@ Coverage Diff @@
## cleanup/cache #1025 +/- ##
=================================================
+ Coverage 61.25% 61.45% +0.19%
=================================================
Files 66 66
Lines 1017 1017
=================================================
+ Hits 623 625 +2
+ Misses 394 392 -2
Continue to review full report at Codecov.
|
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.
result.should.deep.equal(campaign); | ||
}); | ||
|
||
test('campaigns.get should return falsy when cache undefined', async (t) => { |
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 for the descriptive tests 👌
.then(entries => resolve(underscore.first(entries.items))) | ||
.catch(error => reject(exports.contentfulError(error))); | ||
.then(entries => resolve(underscore.first(entries.items))) | ||
.catch(error => reject(exports.contentfulError(error))); |
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.
Indentation looks better, and probably makes the linter happy as well 🙂
What's this PR do?
Adds a test for the cache helper in #1024, which is essentially a copy/paste job from Conversations.
Our linter wasn't happy with the use of
rewire
, complaining about aTypeError: Assignment to constant variable.
. Updating our lint config to match Conversations made it happy, and required some cleanup in other files.How should this be reviewed?
npm run all-tests
Any background context you want to provide?
Once #1024 is merged, I'll edit this PR to merge into
master
instead ofcleanup/cache
.