Ingest setup upgrade#7
Merged
jonathan-buttner merged 8 commits intojonathan-buttner:ingest-setup-upgradefrom Sep 28, 2020
jfsiii:ingest-setup-upgrade
Merged
Ingest setup upgrade#7jonathan-buttner merged 8 commits intojonathan-buttner:ingest-setup-upgradefrom jfsiii:ingest-setup-upgrade
jonathan-buttner merged 8 commits intojonathan-buttner:ingest-setup-upgradefrom
jfsiii:ingest-setup-upgrade
Conversation
added 8 commits
September 25, 2020 12:55
Deal with issue described in jestjs/jest#1075 (comment) epm/packages/install has functions a, b, c which are independent but a can also call b and c function a() { b(); c(); } The linked FB issue describes the cause and rationale (Jest works on "module" boundary) but TL;DR: it's easier if you split up your files Some related links I found during this journey * https://medium.com/@qjli/how-to-mock-specific-module-function-in-jest-715e39a391f4 * https://stackoverflow.com/questions/52650367/jestjs-how-to-test-function-being-called-inside-another-function * https://stackoverflow.com/questions/50854440/spying-on-an-imported-function-that-calls-another-function-in-jest/50855968#50855968
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Opening a PR in case it's easier to discuss & adopt. CI tracked in elastic#78560
Draft-level PR description. Happy to discuss more in person or here.
ensureInstalledDefaultPackagesinto its own file to aid in testing/mockingpackages/install.test.tsinto two filesensure_installed_default_packages.test.ts&get_install_type.test.tsto keep any mocking effects separate