Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Use test fixtures in encoder and compile-solidity #5346

Merged
merged 3 commits into from Jul 27, 2022
Merged

Conversation

cds-amal
Copy link
Member

@cds-amal cds-amal commented Jul 22, 2022

Some CI jobs were randomly failing at truffle unbox step, so I added fixtures to avoid network calls. There's a bonus refactor to replace a promise callback with async/await.

This will speed up testing because unboxing from FS
is faster than over network
This will speed up testing because unboxing from FS is faster than over network.

- add fixture
- use helper to setup sandbox
@cds-amal cds-amal marked this pull request as draft July 22, 2022 14:15
@cds-amal cds-amal marked this pull request as ready for review July 22, 2022 15:28
Copy link
Contributor

@cliffoo cliffoo left a comment

Choose a reason for hiding this comment

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

This is great. Thank you @cds-amal !

throw new Error(`Sandbox failed: source: ${source} does not exist`);
}

const tempDir = tmp.dirSync({ unsafeCleanup: true });
Copy link
Contributor

Choose a reason for hiding this comment

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

This is cleaner than glob then fs.removeSync, nice.

@cds-amal cds-amal merged commit c5de9c2 into develop Jul 27, 2022
@cds-amal cds-amal deleted the test-optimize branch July 27, 2022 04:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants