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

feat: adding smock package #10

Merged
merged 9 commits into from
May 9, 2024
Merged

feat: adding smock package #10

merged 9 commits into from
May 9, 2024

Conversation

wei3erHase
Copy link
Member

No description provided.

@wei3erHase wei3erHase changed the base branch from dev to refactor/happy-path-org May 9, 2024 11:37
BPool.Record({
bound: true,
index: i,
denorm: BONE, // TODO: set denorm? is it relevant?

Choose a reason for hiding this comment

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

Not relevant, at least in JoinPool

Copy link
Member Author

Choose a reason for hiding this comment

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

interesting! 👀

@@ -24,6 +24,7 @@
"lint:sol-logic": "solhint -c .solhint.json 'src/**/*.sol' 'script/**/*.sol'",
"lint:sol-tests": "solhint -c .solhint.tests.json 'test/**/*.sol'",
"prepare": "husky install",
"smock": "smock-foundry --contracts src/contracts",

Choose a reason for hiding this comment

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

we should add this when building and running the tests

Copy link
Member Author

Choose a reason for hiding this comment

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

mhhh, i've added it on the CI, but i believe smock contracts are sth that are not gonna suffer much changes, and if it does all you get is a compilation error on a smock contract, and you'll know you must run yarn smock, but adding this routine to the yarn build seems like suboptimal time-wise, wdyt?

Choose a reason for hiding this comment

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

no worries, I was suggesting it so you can run yarn test:unit without having to run yarn smock before

tokens[i],
BPool.Record({
bound: true,
index: i,

Choose a reason for hiding this comment

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

Nice catch, I forgot setting index, idk why it worked tho

Copy link
Member Author

Choose a reason for hiding this comment

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

now i realized that i can set both index and denorm to zero

Base automatically changed from refactor/happy-path-org to test/bpool-unit-tests May 9, 2024 12:27
@wei3erHase wei3erHase merged commit 922e19c into test/bpool-unit-tests May 9, 2024
4 checks passed
@wei3erHase wei3erHase deleted the feat/smock branch May 9, 2024 12:38
0xAustrian added a commit that referenced this pull request May 9, 2024
* test: wip initial test structure

* test: complete scaffolding

* test: add happy path for joinPool

* test: wip

* test: tweak assume

* test: wip, improve fuzzing

* test: improve assume

* test: assumes are working now

* test: increase tokens to 8

* test: finish happyPath for joinPool

* fix: lint

* test: improve happyPath

* fix: avoid empty tests from running

* test: small improvements

* fix: small compilation error

* test: create Utils library

* fix: moving happy path to specific test contract (#11)

* fix: moving happy path to specific test contract

* fix: linter errors

* feat: adding smock package (#10)

* feat: adding smock package

* fix: moving happy path to specific test contract

* fix: linter errors

* feat: implementing smock to unit test

* fix: adding smock to ci

* fix: ci

* fix: addressing comments in pr

---------

Co-authored-by: Weißer Hase <[email protected]>
Co-authored-by: Weißer Hase <[email protected]>
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.

2 participants