[Test] Test.Blockchain
struct reuses one single backend implementation
#139
Labels
Bug
The issue represents a bug, malfunction, regression
Improvement
Technical work without new features, refactoring, improving tests
Problem
Currently, when the
Test.newEmulatorBlockchain()
is called, it returns a newTest.Blockchain
struct. However, the underlying backend implementation is the same for allTest.Blockchain
structs that are created in a single test file. This is due to the fact that theContractValueHandler
injects only once the backend implementation, when it first encounters theTest
contract in a test file.Steps to Reproduce
Acceptance Criteria
Either returns a newly-created backend implementation for every call of
Test.newEmulatorBlockchain()
, or maybe move towards making theTest.Blockchain
a singleton. Creating many backend implementations should add some overhead when running tests, and right now, it is possible to callReset()
on aTest.Blockchain
value. See discussion in #138.Context
onflow/developer-grants#148
The text was updated successfully, but these errors were encountered: