Sure thing, you mean creating a separate post in the Showcase topic or a different topic?
I'll also pushed the code to my GitHub. The test is here:
And the contract is here:
You may also need the token contract:
The whole test run fails before running any of the listed tests. It reads the describe('MyCrowdsale', function () { ... } and fails before completing the beforeEach hook.
Thank you @abcoathup! The error makes sense when reading the test above. I’ll try running it this way when I have time today and let you know if it resolves the issue.
I just tested it after updating it and the previous error was resolved. I see how concatenating these values could cause it to exceed the acceptable limit.
I’ll definitely be reading through these tests more closely to make mine more effective. Thanks again @abcoathup!
I have one more question about some of the math in these tests: The syntax for .add.sub and .pow are very similar to the math functions from the SafeMath library.
Are these being called from the test-helpers file or are they already integrated as part of the test-environment? As far as I know, these aren’t native to JS so I’m just curious where we pulled them from, then I can take a closer look.