Releases: LimeChain/matchstick
Releases · LimeChain/matchstick
v0.4.2
Merge pull request #318 from LimeChain/add-uint-to-type-check Fix missing uint type
v0.4.1
- Requires
matchstick-as
version 0.4.1 - IPFS
map
andcat
functions can now be tested. More on that here - Fixed unexpected behaviour caused by deletion/update of entities containing derived fields not reflecting on the entity they are pointing to.
createMockedFunction
now also check for the amount and types of arguments given by looking at the function signature.- Fixed
dataSource.address()
not returning a correct Address value
v0.4.0
- Function for returning the amount of entities of a certain type and one for asserting it have been added in matchstick-as 0.4.0, example here
- Improved option for selecting a different test folder and added an option for selecting a different
node_modules
folder, more on that here - Windows no longer supported as a standalone binary, still supported via docker
- Couple of bug fixes including some M1 chips not being recognised as M1 when selecting binary and
testsFolder
crashing ongraph codegen
- Minor performance improvements
v0.3.0
- Derived fields can be tested now. More on that here - https://github.com/LimeChain/demo-subgraph/blob/main/README.md#testing-derived-fields
- Dynamic datasources can be tested as well by manually mocking the
dataSource
methods with the newly addeddataSourceMock
namespace in matchstick-as (https://github.com/LimeChain/matchstick-as/blob/main/assembly/data_source_mock.ts). For more information on how to do that + an example you can check the README section here - https://github.com/LimeChain/demo-subgraph/blob/main/README.md#testing-dynamic-data-sources - Several bug fixes like the coverage flag not working
v0.2.3
- Windows binary created and working now
- shouldFail not failing test when test doesn't error is now fixed
- Refactors how the coverage tool works (requires matchstick-as version 0.2.3)
- More clarity added to errors and messages on test fails
v0.2.2
- Fixes
logStore()
not working - Fixes
No such file or directory (os error 2)
v0.2.1
- Docker is now an alternative for running matchstick - see README for instructions on how to use it
- Location of the tests folder can now be changed with the new
testsFolder
attribute that can be added to thesubgraph.yaml
- Changing the location of
schema.graphql
does not cause and error anymore - Recompiling previously compiled tests is now instant
- Code coverage added, example usage:
graph test -c
- Errors are now more descriptive
- Numerous bug fixes
- Improved UI
Testing graph-25 version update
0.2.1-test update graphql parser version
v0.2.0
- M1 Macs are now supported (before they threw a 'libpq not loaded error')
- Tests are now evaluated individually and do not require a
runTests
function encompassing them - Due to the update above exporting
runTests
from your mapping file is no longer necessary and therefore deployment is no longer being broken by that - When trying to save an entity to the store, Matchstick now checks whether you have all the required fields properly set and alarms you if they are not
get_available_datasources
now returns only datasources for which at least 1 test is written- WASM binary is now compiled directly from tests
- A helper method was added to matchstick-as for mocking call handlers that returns a filled instance of ethereum.Call -
newMockCall()
, example below:
let call = changetype<CreateGravatarCall>(newMockCall())
call.inputValues = [new ethereum.EventParam("displayName", ethereum.Value.fromString("name")), new ethereum.EventParam("imageUrl", ethereum.Value.fromString("example.com"))]
handleCreateGravatar(call)
assert.fieldEquals(TRANSACTION_ENTITY_TYPE, "0xa16081f360e3847006db660bae1c6d1b2e17ec2a", "displayName", "name")
assert.fieldEquals(TRANSACTION_ENTITY_TYPE, "0xa16081f360e3847006db660bae1c6d1b2e17ec2a", "imageUrl", "example.com")
- For more details check the README file of the project
An early preview of test decoupling.
0.1.6a sync with main and resolve conflicts