-
Notifications
You must be signed in to change notification settings - Fork 22
feat: add origin snapshotting #274
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
base: master
Are you sure you want to change the base?
Conversation
| console.log(`Reset blockchain to snapshot with ID: ${originSnapshot}`); | ||
| } | ||
|
|
||
| console.log("\n\n* Test Teardown Complete *\n"); |
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.
Calls to 'console.log' are not allowed.
|
|
||
| if (originSnapshotString && originSnapshot >= 0) { | ||
| await web3Utils.revertToSnapshot(originSnapshot); | ||
| console.log(`Reset blockchain to snapshot with ID: ${originSnapshot}`); |
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.
Calls to 'console.log' are not allowed.
| const web3Utils = new Web3Utils(web3); | ||
|
|
||
| module.exports = async () => { | ||
| console.log("\n\n* Test Teardown *\n"); |
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.
Calls to 'console.log' are not allowed.
|
|
||
| console.log(`Saved origin snapshot with ID: ${originSnapshot}`); | ||
|
|
||
| console.log("\n\n* Test Setup Complete *\n"); |
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.
Calls to 'console.log' are not allowed.
|
|
||
| process.env.originSnapshot = originSnapshot.toString(); | ||
|
|
||
| console.log(`Saved origin snapshot with ID: ${originSnapshot}`); |
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.
Calls to 'console.log' are not allowed.
| const web3Utils = new Web3Utils(web3); | ||
|
|
||
| module.exports = async () => { | ||
| console.log("\n\n* Test Setup *\n"); |
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.
Calls to 'console.log' are not allowed.
This outlines a way to do origin snapshotting, so that we can reset to an origin snapshot during test setup without needing to save snapshots, etc.
One thing I'm uncertain about is whether the script .ts files get transpiled on difference machines - because this needs to happen in order to work. Will look to circle to find out.