Skip to content

[Test] Enable help.test.ts#489

Merged
ananzh merged 1 commit intoopensearch-project:mainfrom
ananzh:i-487
Jun 24, 2021
Merged

[Test] Enable help.test.ts#489
ananzh merged 1 commit intoopensearch-project:mainfrom
ananzh:i-487

Conversation

@ananzh
Copy link
Copy Markdown
Member

@ananzh ananzh commented Jun 17, 2021

Signed-off-by: Anan Zhuang ananzh@amazon.com

Description

Don't find any specific reasons to skip this unit test. Unit test for getCommandLevelHelp function passes no usage parameters. We can either 1) change the inline snapshot:
node node_modules/jest-worker/build/workers/processChild.js foo [...names] ---> node scripts/jest foo [...names]
or 2) pass a usage parameter to match inline snapshot. No specific pros and cons between these two options.

This PR uses option 2) and passes a usage parameter to match inline snapshot.

Issues Resolved

#487

Test results

unit test for help.test.ts

$ node scripts/jest /packages/osd-dev-utils/src/run/help.test.ts
 PASS  packages/osd-dev-utils/src/run/help.test.ts
  getHelp()
    ✓ returns the expected output (5 ms)
  getCommandLevelHelp()
    ✓ returns the expected output (1 ms)
  getHelpForAllCommands()
    ✓ returns the expected output (1 ms)

overall unit test:

Test Suites: 22 skipped, 1412 passed, 1412 of 1434 total
Tests:       255 skipped, 9 todo, 10360 passed, 10624 total
Snapshots:   2366 passed, 2366 total
Time:        44.748 s

integration test:

Test Suites: 50 passed, 50 total
Tests:       3 skipped, 434 passed, 437 total
Snapshots:   73 passed, 73 total
Time:        327.176 s

functional test:

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

@ananzh ananzh added bug Something isn't working test:unit v1.0.0 labels Jun 17, 2021
@ananzh ananzh requested review from boktorbb, kavilla and tmarkley June 17, 2021 16:19
@ananzh ananzh self-assigned this Jun 17, 2021
@ananzh ananzh mentioned this pull request Jun 17, 2021
26 tasks
@opensearch-ci-bot
Copy link
Copy Markdown
Collaborator

✅   DCO Check Passed 51782f3

@ananzh
Copy link
Copy Markdown
Member Author

ananzh commented Jun 18, 2021

Jenkin's test (unit, integration and fun)

Screen Shot 2021-06-17 at 5 43 48 PM

tmarkley
tmarkley previously approved these changes Jun 18, 2021
Copy link
Copy Markdown
Contributor

@tmarkley tmarkley left a comment

Choose a reason for hiding this comment

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

LGTM, but I'd recommend amending the commit message with more details.

@ananzh
Copy link
Copy Markdown
Member Author

ananzh commented Jun 18, 2021

LGTM, but I'd recommend amending the commit message with more details.

Will modify the commit message. Thanks Tommy.

@opensearch-ci-bot
Copy link
Copy Markdown
Collaborator

✅   DCO Check Passed 70674bd

@ananzh ananzh changed the title Enable help.test.ts [Test] Enable help.test.ts Jun 18, 2021
@ananzh ananzh removed the bug Something isn't working label Jun 18, 2021
Help.test.ts is skipped for no specific reasons. To make a clean
unit test,  we enabled and modified help.test.ts to match the
corresponding inline snapshots.

Signed-off-by: Anan Zhuang <ananzh@amazon.com>
@opensearch-ci-bot
Copy link
Copy Markdown
Collaborator

✅   DCO Check Passed f0f2846

Copy link
Copy Markdown
Member

@kavilla kavilla left a comment

Choose a reason for hiding this comment

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

LGTM, trying to follow the git history in the original skipped. It wasn't clear for me either why this was skipped.

@ananzh ananzh merged commit 2457d02 into opensearch-project:main Jun 24, 2021
kavilla pushed a commit that referenced this pull request Jun 26, 2021
Help.test.ts is skipped for no specific reasons. To make a clean
unit test,  we enabled and modified help.test.ts to match the
corresponding inline snapshots.

Signed-off-by: Anan Zhuang <ananzh@amazon.com>
kavilla pushed a commit that referenced this pull request Jun 26, 2021
Help.test.ts is skipped for no specific reasons. To make a clean
unit test,  we enabled and modified help.test.ts to match the
corresponding inline snapshots.

Signed-off-by: Anan Zhuang <ananzh@amazon.com>
@ananzh ananzh deleted the i-487 branch September 14, 2021 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants