Conversation
Owner
|
Wow, thanks for adding tests! Let me take a look at them, to see if I can merge. |
Cosmodude
requested changes
Aug 2, 2024
Owner
Cosmodude
left a comment
There was a problem hiding this comment.
Request for clarification and expansion of tests
| description: "Collection of items with onChain metadata", | ||
| image: "https://raw.githubusercontent.com/Cosmodude/Nexton/main/Nexton_Logo.jpg" | ||
| name: process.env.COLLECTION_NAME!, | ||
| description: process.env.COLLECTION_DESCRIPTION!, |
Owner
There was a problem hiding this comment.
Why do we need these params from .env?
Owner
There was a problem hiding this comment.
Isn't hardcoded data more demonstrative?
| // check next_item_index | ||
| expect(collection_data).toHaveProperty("nextItemId", BigInt(0)); | ||
| // check collection content | ||
| expect(collection_data.collectionContent).toEqualCell(collectionContent); |
Owner
There was a problem hiding this comment.
It would be great to check all the content fields one by one (name, description and image).
You can refer to these tests
https://github.com/Cosmodude/Nexton/blob/main/tests/NexTon.spec.ts#L111C9-L111C15
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.
Hello, I appreciated your article on Medium (https://medium.com/nexton-node/nfts-with-on-chain-metadata-on-ton-tutorial-55ac0cbb17d5). So I've created unit tests for provided code. Maybe it could be interesting for your readers. If you think it's not worth including them then I apologize for bothering you. Thanks in advance and have a nice day!
P.S. To execute tests run
npm run testin terminal.