Skip to content
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

FTDCS-196 - Update testing #187

Merged
merged 10 commits into from
Jun 20, 2022
Merged

FTDCS-196 - Update testing #187

merged 10 commits into from
Jun 20, 2022

Conversation

JSRedondo
Copy link
Contributor

  • Update testing packages Sinon, Mocha & Chai.
  • Create some stubs inside the beforeEach, to avoid interferences between tests -> tests isolation
  • Fix a missing done parameter.

@JSRedondo JSRedondo requested a review from a team as a code owner June 17, 2022 11:43
@JSRedondo JSRedondo requested a review from a team June 17, 2022 11:43
@@ -5,7 +5,7 @@ const fixture = require('./fixtures/config/pingdomCheckFixture.js').checks[0];
const PingdomCheck = require('../src/checks/pingdom.check');

describe('Pingdom Check', function() {
it('should fail and return a deprecation message', function() {
it('should fail and return a deprecation message', function(done) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice spot 👍

@@ -0,0 +1,3 @@
module.exports = {
exit: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a bit concerning that we still need to rely on mocha to force exit (I see that in mocha v4 and below it force exits by default), it'll be good to understand what processes we need to clean up - but don't worry as it's beyond the scope of your ticket, I'll review this another time

Copy link
Member

@alexmuller alexmuller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is all ok but I'm certainly no JavaScript testing expert.

In some commits I did find it a little bit difficult to see what had changed in between the code structure changes - for example in 27a02b5 the actual diff is quite small compared to the other changes in the commit.

@JSRedondo
Copy link
Contributor Author

I think this is all ok but I'm certainly no JavaScript testing expert.

In some commits I did find it a little bit difficult to see what had changed in between the code structure changes - for example in 27a02b5 the actual diff is quite small compared to the other changes in the commit.

Just In Case I am going to fix the format in the first place for the following PRs.

@JSRedondo JSRedondo merged commit 7d65dbe into main Jun 20, 2022
@JSRedondo JSRedondo deleted the update-testing branch June 20, 2022 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants