-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
test/unit/BPool.t.sol
Outdated
BPool.Record({ | ||
bound: true, | ||
index: i, | ||
denorm: BONE, // TODO: set denorm? is it relevant? |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
test/unit/BPool.t.sol
Outdated
tokens[i], | ||
BPool.Record({ | ||
bound: true, | ||
index: i, |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
* 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]>
No description provided.