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

Converts some Mocha unit tests to Jest #85514

Merged
merged 3 commits into from
Dec 10, 2020

Conversation

tylersmalley
Copy link
Contributor

@tylersmalley tylersmalley commented Dec 10, 2020

Part of #85513 in order to remove the Mocha unit test runner.

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
@tylersmalley
Copy link
Contributor Author

@elasticmachine merge upstream

@tylersmalley tylersmalley added Team:Operations Team label for Operations Team v7.11.0 v8.0.0 release_note:skip Skip the PR/issue when compiling release notes labels Dec 10, 2020
@tylersmalley tylersmalley marked this pull request as ready for review December 10, 2020 16:51
@tylersmalley tylersmalley requested review from a team as code owners December 10, 2020 16:51
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations (Team:Operations)

Copy link
Contributor

@cjcenizal cjcenizal left a comment

Choose a reason for hiding this comment

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

Thanks for making these changes @tylersmalley! ES UI changes to Console LGTM. Had a few non-blocking suggestions.

const result = agent.options.checkServerIdentity('right.com', cert);
expect(result).to.be(undefined);
expect(result).toBe(undefined);
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: this can be toBeUndefined()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These changes are mostly done with codemods, so going to leave it since it doesn't make any functional difference and keeps with the existing usage. We can always follow-up with a PR across the repo afterwards.

@@ -114,7 +111,7 @@ describe('plugins/console', function () {
ssl: { ...config.ssl, verificationMode: 'full' },
});

expect(agent.options.checkServerIdentity).to.be(undefined);
expect(agent.options.checkServerIdentity).toBe(undefined);
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here and in a few more places below

expect(conf).to.have.property('rejectUnauthorized', false);
expect(conf.agent).to.be(undefined);
expect(conf).toHaveProperty('rejectUnauthorized', false);
expect(conf.agent).toBe(undefined);
Copy link
Contributor

Choose a reason for hiding this comment

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

And here.

Copy link
Member

@mistic mistic left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
Copy link
Member

@wayneseymour wayneseymour left a comment

Choose a reason for hiding this comment

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

LGTM

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Copy link
Member

@lukeelmers lukeelmers left a comment

Choose a reason for hiding this comment

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

App Services code LGTM 🚀

Thanks for the cleanup.

@tylersmalley tylersmalley merged commit c0f9de1 into elastic:master Dec 10, 2020
tylersmalley pushed a commit to tylersmalley/kibana that referenced this pull request Dec 11, 2020
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
# Conflicts:
#	src/dev/code_coverage/ingest_coverage/either.test.js
#	src/dev/code_coverage/ingest_coverage/ingest_helpers.test.js
#	src/dev/code_coverage/ingest_coverage/team_assignment/enumerate_patterns.test.js
#	src/dev/code_coverage/ingest_coverage/team_assignment/enumeration_helpers.test.js
#	src/dev/code_coverage/ingest_coverage/transforms.test.js
tylersmalley pushed a commit that referenced this pull request Dec 11, 2020
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
# Conflicts:
#	src/dev/code_coverage/ingest_coverage/either.test.js
#	src/dev/code_coverage/ingest_coverage/ingest_helpers.test.js
#	src/dev/code_coverage/ingest_coverage/team_assignment/enumerate_patterns.test.js
#	src/dev/code_coverage/ingest_coverage/team_assignment/enumeration_helpers.test.js
#	src/dev/code_coverage/ingest_coverage/transforms.test.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team:Operations Team label for Operations Team v7.11.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants