-
Notifications
You must be signed in to change notification settings - Fork 285
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
test: migrate from test runner tap to jest #238
Comments
Good news discovered in the meantime: Since both |
Refactoring this as per #299 (comment) to be about migrating to AVA not tape... |
Migrate test execution to AVA from tap. This is necessary because tap has some unresolved issue that make the test cases flaky and tape lacks features regarding being able to support code coverage and Typescript compilation at the same time. Using AVA fixes both of those shortcomings. Fixes hyperledger-cacti#238 Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Fixes hyperledger-cacti#299 This does not provide a real fix for the issue just marks the tests to be skipped for now until we complete the migration to a different test runner which will implicitly provide the real fix as per hyperledger-cacti#299 (comment) => Finally had the time to investigate this properly and it is an issue that traces back to the tap test executor unfortunately. We already had plans to replace tap with tape for other reasons (adding browser testing support) but now this has become more important than ever. While seeing if we could use tape as the test runner as well, I arrived at the conclusion that we cannot because it does not support obtaining coverage while also compiling the Typescript code on the fly. Another executor that does support this and also satisfies our requirement of being able to spit out TAP formatted results is AVA so I will update the relevant GH issue hyperledger-cacti#238 about test runner migration to target AVA instead of tape... Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Migrate test execution to AVA from tap. This is necessary because tap has some unresolved issue that make the test cases flaky and tape lacks features regarding being able to support code coverage and Typescript compilation at the same time. Using AVA fixes both of those shortcomings. Fixes hyperledger-cacti#238 Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Fixes hyperledger-cacti#299 This does not provide a real fix for the issue just marks the tests to be skipped for now until we complete the migration to a different test runner which will implicitly provide the real fix as per hyperledger-cacti#299 (comment) => Finally had the time to investigate this properly and it is an issue that traces back to the tap test executor unfortunately. We already had plans to replace tap with tape for other reasons (adding browser testing support) but now this has become more important than ever. While seeing if we could use tape as the test runner as well, I arrived at the conclusion that we cannot because it does not support obtaining coverage while also compiling the Typescript code on the fly. Another executor that does support this and also satisfies our requirement of being able to spit out TAP formatted results is AVA so I will update the relevant GH issue hyperledger-cacti#238 about test runner migration to target AVA instead of tape... Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Migrate test execution to AVA from tap. This is necessary because tap has some unresolved issue that make the test cases flaky and tape lacks features regarding being able to support code coverage and Typescript compilation at the same time. Using AVA fixes both of those shortcomings. Fixes hyperledger-cacti#238 Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Migrate test execution to AVA from tap. This is necessary because tap has some unresolved issue that make the test cases flaky and tape lacks features regarding being able to support code coverage and Typescript compilation at the same time. Using AVA fixes both of those shortcomings. Fixes hyperledger-cacti#238 Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Fixes hyperledger-cacti#299 This does not provide a real fix for the issue just marks the tests to be skipped for now until we complete the migration to a different test runner which will implicitly provide the real fix as per hyperledger-cacti#299 (comment) => Finally had the time to investigate this properly and it is an issue that traces back to the tap test executor unfortunately. We already had plans to replace tap with tape for other reasons (adding browser testing support) but now this has become more important than ever. While seeing if we could use tape as the test runner as well, I arrived at the conclusion that we cannot because it does not support obtaining coverage while also compiling the Typescript code on the fly. Another executor that does support this and also satisfies our requirement of being able to spit out TAP formatted results is AVA so I will update the relevant GH issue hyperledger-cacti#238 about test runner migration to target AVA instead of tape... Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Migrate test execution to AVA from tap. This is necessary because tap has some unresolved issue that make the test cases flaky and tape lacks features regarding being able to support code coverage and Typescript compilation at the same time. Using AVA fixes both of those shortcomings. Fixes hyperledger-cacti#238 Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Fixes #299 This does not provide a real fix for the issue just marks the tests to be skipped for now until we complete the migration to a different test runner which will implicitly provide the real fix as per #299 (comment) => Finally had the time to investigate this properly and it is an issue that traces back to the tap test executor unfortunately. We already had plans to replace tap with tape for other reasons (adding browser testing support) but now this has become more important than ever. While seeing if we could use tape as the test runner as well, I arrived at the conclusion that we cannot because it does not support obtaining coverage while also compiling the Typescript code on the fly. Another executor that does support this and also satisfies our requirement of being able to spit out TAP formatted results is AVA so I will update the relevant GH issue #238 about test runner migration to target AVA instead of tape... Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Migrate test execution to AVA from tap. This is necessary because tap has some unresolved issue that make the test cases flaky and tape lacks features regarding being able to support code coverage and Typescript compilation at the same time. Using AVA fixes both of those shortcomings. Fixes hyperledger-cacti#238 Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Migrate test execution to AVA from tap. This is necessary because tap has some unresolved issue that make the test cases flaky and tape lacks features regarding being able to support code coverage and Typescript compilation at the same time. Using AVA fixes both of those shortcomings. Fixes hyperledger-cacti#238 Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Migrate test execution to AVA from tap. This is necessary because tap has some unresolved issue that make the test cases flaky and tape lacks features regarding being able to support code coverage and Typescript compilation at the same time. Using AVA fixes both of those shortcomings. Fixes hyperledger-cacti#238 Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Migrate test execution to AVA from tap. This is necessary because tap has some unresolved issue that make the test cases flaky and tape lacks features regarding being able to support code coverage and Typescript compilation at the same time. Using AVA fixes both of those shortcomings. Fixes hyperledger-cacti#238 Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Migrate test execution to AVA from tap. This is necessary because tap has some unresolved issue that make the test cases flaky and tape lacks features regarding being able to support code coverage and Typescript compilation at the same time. Using AVA fixes both of those shortcomings. Fixes hyperledger-cacti#238 Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Migrate test execution to AVA from tap. This is necessary because tap has some unresolved issue that make the test cases flaky and tape lacks features regarding being able to support code coverage and Typescript compilation at the same time. Using AVA fixes both of those shortcomings. Fixes hyperledger-cacti#238 Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
WORK IN PROGRESS Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Migrated test from Tap to Jest File Path: packages/cactus-test-cmd-api-server/ src/test/typescript/integration/ remote-plugin-imports.test.ts This is a PARTIAL resolution to issue #238 Signed-off-by: Youngone Lee <youngone.lee@accenture.com> Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Migrated test from Tap to Jest. File Path: packages/cactus-test-plugin-consortium-manual/src /test/typescript/integration/plugin-consortium-manual/get-consortium-jws-endpoint.test.ts This is a PARTIAL resolution to issue hyperledger-cacti#238 Signed-off-by: awadhana <awadhana2021@gmail.com> Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Migrated test from Tap to Jest. File Path: packages/cactus-test-plugin-consortium-manual/src /test/typescript/integration/plugin-consortium-manual/get-consortium-jws-endpoint.test.ts This is a PARTIAL resolution to issue hyperledger-cacti#238 Signed-off-by: awadhana <awadhana2021@gmail.com> Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Migrated test from Tap to Jest. File Path: packages/cactus-test-plugin-consortium-manual/src /test/typescript/integration/plugin-consortium-manual/get-consortium-jws-endpoint.test.ts This is a PARTIAL resolution to issue hyperledger-cacti#238 Signed-off-by: awadhana <awadhana2021@gmail.com> Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Migrated test from Tap to Jest. File Path: packages/cactus-test-plugin-consortium-manual/src /test/typescript/integration/plugin-consortium-manual/get-consortium-jws-endpoint.test.ts This is a PARTIAL resolution to issue #238 Signed-off-by: awadhana <awadhana2021@gmail.com> Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Migrated test from Tap to Jest. File Path: packages/cactus-plugin-ledger-connector-quorum/ src/test/typescript/integration/plugin-ledger-connector-quorum/ deploy-contract/v2.3.0-deploy-contract-from-json.test.ts This is a PARTIAL resolution to issue hyperledger-cacti#238 Signed-off-by: awadhana <awadhana0825@gmail.com> Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Migrated test from Tap to Jest. File Path: packages/cactus-test-cmd-api-server/src/test/typescript/ integration/plugin-import-with-npm-install.test.ts This is a PARTIAL resolution to issue hyperledger-cacti#238 Signed-off-by: awadhana <awadhana0825@gmail.com>
Migrated test from Tap to Jest. File Path: packages/cactus-plugin-keychain-memory/src/ test/typescript/unit/plugin-keychain-memory.test.ts This is a PARTIAL resolution to issue hyperledger#238 Signed-off-by: awadhana <awadhana2021@gmail.com>
Migrated test from Tap to Jest. File Path: packages/cactus-cmd-api-server/src/test/typescript/ integration/remote-plugin-imports.test.ts This is a PARTIAL resolution to issue hyperledger-cacti#238 Signed-off-by: awadhana <awadhana2021@gmail.com>
Migrated test from Tap to Jest. File Path: packages/cactus-plugin-ledger-connector-quorum/ src/test/typescript/integration/plugin-ledger-connector-quorum/ deploy-contract/v2.3.0-deploy-contract-from-json.test.ts This is a PARTIAL resolution to issue hyperledger-cacti#238 Signed-off-by: awadhana <awadhana0825@gmail.com> Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Migrated test from Tap to Jest. File Path: packages/cactus-plugin-ledger-connector-quorum/ src/test/typescript/integration/plugin-ledger-connector-quorum/ deploy-contract/v2.3.0-deploy-contract-from-json.test.ts This is a PARTIAL resolution to issue #238 Signed-off-by: awadhana <awadhana0825@gmail.com> Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Migrated test from Tap to Jest. File Path: packages/cactus-test-cmd-api-server/src/test/typescript/ integration/plugin-import-with-npm-install.test.ts This is a PARTIAL resolution to issue hyperledger-cacti#238 Signed-off-by: awadhana <awadhana0825@gmail.com> Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Migrated test from Tap to Jest. File Path: packages/cactus-test-cmd-api-server/src/test/typescript/ integration/plugin-import-with-npm-install.test.ts This is a PARTIAL resolution to issue hyperledger-cacti#238 Signed-off-by: awadhana <awadhana0825@gmail.com> Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Migrated test from Tap to Jest. File Path: packages/cactus-test-cmd-api-server/src/test/typescript/ integration/plugin-import-with-npm-install.test.ts This is a PARTIAL resolution to issue hyperledger-cacti#238 Signed-off-by: awadhana <awadhana0825@gmail.com> Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Migrated test from Tap to Jest. File Path: packages/cactus-test-cmd-api-server/src/test/typescript/ integration/plugin-import-with-npm-install.test.ts This is a PARTIAL resolution to issue #238 Signed-off-by: awadhana <awadhana0825@gmail.com> Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Migrated test from Tap to Jest. File Path: packages/cactus-plugin-keychain-memory/src/ test/typescript/unit/plugin-keychain-memory.test.ts This is a PARTIAL resolution to issue hyperledger#238 Signed-off-by: awadhana <awadhana2021@gmail.com> Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Migrated test from Tap to Jest. File Path: packages/cactus-plugin-keychain-memory/src/ test/typescript/unit/plugin-keychain-memory.test.ts This is a PARTIAL resolution to issue hyperledger#238 Signed-off-by: awadhana <awadhana2021@gmail.com> Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Migrated test from Tap to Jest File Path: packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/ typescript/integration/plugin-htlc-eth-besu-erc20/ get-single-status-endpoint-invalid.test.ts This is a PARTIAL resolution to issue hyperledger-cacti#238 Signed-off-by: awadhana <awadhana2021@gmail.com> Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Migrated test from Tap to Jest File Path: packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/ typescript/integration/plugin-htlc-eth-besu-erc20/ get-single-status-endpoint-invalid.test.ts This is a PARTIAL resolution to issue #238 Signed-off-by: awadhana <awadhana2021@gmail.com> Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
File Path: packages/cactus-test- tooling/src/test/ typescript/integration/ common/ containers.test.ts Edit from Peter: I updated the ci.yml file as well (this became a requirement some time after this PR was opened & reviewed). This is a PARTIAL resolution to issue hyperledger-cacti#238 Signed-off-by: Youngone Lee <youngone.lee@accenture.com> Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
File Path: packages/cactus-test- tooling/src/test/ typescript/integration/ common/ containers.test.ts Edit from Peter: I updated the ci.yml file as well (this became a requirement some time after this PR was opened & reviewed). This is a PARTIAL resolution to issue hyperledger-cacti#238 Signed-off-by: Youngone Lee <youngone.lee@accenture.com> Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
File Path: packages/cactus-test- tooling/src/test/ typescript/integration/ common/ containers.test.ts Edit from Peter: I updated the ci.yml file as well (this became a requirement some time after this PR was opened & reviewed). This is a PARTIAL resolution to issue #238 Signed-off-by: Youngone Lee <youngone.lee@accenture.com> Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Closing this because we've moved on to managing the migration through individual tasks per test case or small group of test cases instead of one big epic. |
Update 2021-08-09
This used to be about AVA but now is about Jest
Update 2020-11-02
Switched the target to AVA from jest, details below in comments.
Description
As a developer I want to be able to write unit tests for the universal packages that execute the same code both in NodeJS and in the browser so that I don't have to duplicate work in order to have test coverage for both platforms for the cross-platform packages.
While working on the stable signature generation, we've discovered that accidentally the wrong library was used initially (congratulations to Peter) which is called "tap" instead of "tape". They both do the same thing (test runners for TAP -
Test Anything Protocol
) but thetap
library does not work in browsers while thetape
library is, so to keep the build/test infrastructure of the project as simple as possible it would be the best to migrate totape
entirely since it anyway has support forTAP
(the protocol)https://www.npmjs.com/package/ava
Acceptance Criteria
cactus-common
can be written once and ran "anywhere" (NodeJS, browser)cc: @takeutak @sfuji822 @hartm @jonathan-m-hamilton @AzaharaC @jordigiam @kikoncuo
The text was updated successfully, but these errors were encountered: