-
Notifications
You must be signed in to change notification settings - Fork 376
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
added contract block to allow truffle-test single file execution #198
Conversation
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.
I think this will mean for running all the tests that it will duplicate these tests as it will run in TestWrapper and the individual files
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.
I think it's a bit confusing to separate the regular and upgraded tests. I think it would be nice to be able to run the test file and have it automatically run both the regular and upgraded tests for that file. What do you think of changing our test structure so that each file the has code you added but instead of running the tests in the file, the function passes run_tests as a parameter to a function in TestWrapper that runs run_tests on both the regular and upgraded tokens? So TestWrapper would only consist of a single function that simply ran whatever test set it was passed on a regular and upgraded token.
I like that idea ... I'll update the PR |
Changes:
|
test/TestWrapper.js
Outdated
// an upgraded token. The test_suite_name is printed standard output. | ||
function execute(test_suite_name, run_tests_function) { | ||
contract(test_suite_name, async function (accounts) { | ||
await run_tests_function(newUpgradedToken, accounts); |
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.
Both of these executions seem to be using the newUpgradedToken. Did you intend the first one to use the regular token?
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.
bloops!
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.
See your change. Could you remove the merge commit (by using a rebase) in this PR? We're trying to avoid including merge commits in PRs going forward.
Added a contract block to unit test files. This will let us run
truffle test <filename>
andnpm run truffle-test -- [file]
.