cacti icon indicating copy to clipboard operation
cacti copied to clipboard

test(connector-xdai): jestify openapi-validation.test.ts

Open petermetz opened this issue 1 year ago • 8 comments

Description

The task is to migrate a specific test case (relative path based below) to Jest from TAP: packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/openapi/openapi-validation.test.ts

An example pull request showing how these changes are to be done. Pay attention to the config file changes and the coding style of imports, describe() calls, it()/test() calls, the location of the variables storing the environment specific configuration that is created at runtime during the test execution, etc.

The example PR to use as a reference: https://github.com/hyperledger/cacti/pull/3206/files

Acceptance Criteria

  1. Test is only using Jest for assertions.
  2. Config files updated (.taprc, ci.yaml, jest config, etc) so that the test has no hardcoded references to it in these files and instead gets picked up by the correct glob of the test job in ci.yaml related to the package housing the test.
  3. Test is passing
  4. The way the changes were done to the test case matches all the established patterns. See example PR linked above for the patterns of refactoring.

petermetz avatar Oct 02 '24 17:10 petermetz

Accepting 1st open source project

Shubhamkunwar10 avatar Oct 02 '24 17:10 Shubhamkunwar10

@Shubhamkunwar10 Thank you very much in advance for the contribution!

petermetz avatar Oct 02 '24 17:10 petermetz

@Shubhamkunwar10 Just checking: Are you still working on this? Do you need any help?

petermetz avatar Oct 18 '24 19:10 petermetz

Got busy. Had to work on erc4337 project. Today I am back will update you soon @petermetz

Shubhamkunwar10 avatar Oct 29 '24 06:10 Shubhamkunwar10

@Shubhamkunwar10 No worries, thank you again for the contribution in advance!

petermetz avatar Oct 31 '24 20:10 petermetz

Image

@petermetz using this video to run test but failes: Hyperledger Cactus: Testing a specific package

Shubhamkunwar10 avatar Jan 26 '25 14:01 Shubhamkunwar10

Assigning @adrianbatuto as well so that he can help you better with debugging.

TheJagpreet avatar Feb 04 '25 03:02 TheJagpreet

Hi @Shubhamkunwar10, before running the tests, please make sure to successfully run yarn run configure. Once that’s done, you can proceed with running the test. Also, I believe the video you linked may be outdated. Let me know if you need any help.

adrianbatuto avatar Feb 04 '25 06:02 adrianbatuto

@Shubhamkunwar10 I'm assuming that the above suggestion fixed the issue, but if not, please re-open!

petermetz avatar Apr 04 '25 22:04 petermetz