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

name-service-js: add tests #4013

Merged
merged 3 commits into from
Feb 9, 2023
Merged

Conversation

atharmohammad
Copy link
Contributor

fixes #4004

@mergify mergify bot added the community Community contribution label Feb 1, 2023
Copy link
Contributor

@joncinque joncinque left a comment

Choose a reason for hiding this comment

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

This is really great work, thanks for your contribution! Just a few bits, then this should be good to go.

Can you also add a line to ci/js-test-name-service.sh to do yarn test? This way we can use these right away in CI! https://github.com/solana-labs/solana-program-library/blob/master/ci/js-test-name-service.sh is the file

name-service/js/package.json Outdated Show resolved Hide resolved
name-service/js/package.json Outdated Show resolved Hide resolved
name-service/js/test/e2e/index.test.ts Outdated Show resolved Hide resolved
name-service/js/test/e2e/index.test.ts Show resolved Hide resolved
name-service/js/test/unit/index.test.ts Show resolved Hide resolved
name-service/js/yarn.lock Outdated Show resolved Hide resolved
@atharmohammad
Copy link
Contributor Author

atharmohammad commented Feb 9, 2023

@joncinque how to build name service program before js-test. Make cargo-test-sbf run before js-test in CI?

Copy link
Contributor

@joncinque joncinque left a comment

Choose a reason for hiding this comment

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

The changes look good! Regarding the built program available to CI, you can see how other tests are doing it. Take a look at pull-request-token-swap.yml as an example. You'll see that it uploads the program at the end of the cargo-test-sbf step, and then it downloads the program during the js-test portion. You'll need to add steps to do the same thing in pull-request-name-service.yml

Oh also, this is a little procedural nit from me -- when you make changes after a review, would you mind making those changes in new commits rather than amending your old commit? It makes it much easier to spot what you've done.

name-service/js/package.json Show resolved Hide resolved
name-service/js/test/e2e/index.test.ts Show resolved Hide resolved
name-service/js/test/e2e/index.test.ts Outdated Show resolved Hide resolved
name-service/js/test/e2e/index.test.ts Outdated Show resolved Hide resolved
@joncinque
Copy link
Contributor

Looks great, thanks for your contribution!

@joncinque joncinque changed the title js tests for spl name service name-service-js: add tests Feb 9, 2023
@joncinque joncinque merged commit 59ad74c into solana-labs:master Feb 9, 2023
@atharmohammad atharmohammad deleted the 4004 branch February 9, 2023 18:43
HaoranYi pushed a commit to HaoranYi/solana-program-library that referenced this pull request Jul 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Community contribution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing TS Integration tests for Name Service JS bindings
2 participants