Skip to content

test(benches): add nft test #3159

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

Open
wants to merge 26 commits into
base: main
Choose a base branch
from

Conversation

skywardboundd
Copy link
Contributor

Closes #3154

@skywardboundd skywardboundd linked an issue May 19, 2025 that may be closed by this pull request
@skywardboundd skywardboundd requested a review from Copilot May 19, 2025 21:24
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds new benchmark tests for NFT functionality by updating benchmark test scripts and configurations. Key changes include:

  • Modifying the benchmark file search pattern in update.build.ts to exclude files ending with ".test.spec.ts".
  • Updating benchmark scripts in package.json to use new Jest configurations.
  • Adding new Jest configuration files (jest-test.config.js and jest-bench.config.js) for organizing tests.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

File Description
src/benchmarks/update.build.ts Updated glob pattern to exclude certain test files.
package.json Modified benchmark scripts to reference new Jest configs.
jest-test.config.js New Jest configuration targeting *.test.spec.ts files.
jest-bench.config.js New Jest configuration for benchmark tests excluding test specs.
Comments suppressed due to low confidence (1)

package.json:49

  • The updated 'bench:ci' script now runs both 'bench' and 'bench:test' sequentially. Please confirm that this combined execution approach is intentional and that the overall execution time is acceptable in CI environments.
"bench:ci": "yarn gen:contracts:benchmarks && yarn bench && yarn bench:test"

@skywardboundd skywardboundd marked this pull request as ready for review May 28, 2025 15:37
@skywardboundd skywardboundd requested a review from a team as a code owner May 28, 2025 15:37
@skywardboundd skywardboundd requested a review from Copilot May 28, 2025 19:56
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request adds new NFT tests and benchmarks to the repository while updating related utility functions and contract logic.

  • Adds comprehensive NFT tests including transfer fee validations and forward fee cases.
  • Updates contract assembly code in item.tact to replace forceBasechain with forceBasechainFunc.
  • Introduces benchmark run configurations and updates the spell-check list.

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/benchmarks/nft/tests/utils.ts Added utility functions/constants for NFT tests including error codes.
src/benchmarks/nft/tests/transfer-fee.ts Added test cases for NFT transfer fee scenarios.
src/benchmarks/nft/test.spec.ts Composed overall NFT tests by aggregating item and collection tests.
src/benchmarks/nft/tact/item.tact Updated contract assembly code to use new function forceBasechainFunc.
src/benchmarks/nft/run.ts Added benchmark runner and configuration for NFT tests.
spell/cspell-list.txt Updated spell-check list with a new entry.

@skywardboundd skywardboundd requested a review from xpyctumo June 4, 2025 12:29
Copy link
Contributor

@Kaladin13 Kaladin13 left a comment

Choose a reason for hiding this comment

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

Very hard pr to review since I am not really nft expert, good work nevertheless, please check my comments, most of them could be applied to a lot of places at the same time (wrappers const, wrappers build, \n and so on)

@skywardboundd
Copy link
Contributor Author

skywardboundd commented Jun 23, 2025

transfer-fee.ts is a port from original repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add tests for all benchmarks projects: nft
2 participants