mattlockyer / composables-998

An implementation and documentation repo for developing the ERC-998 standard for Ethereum.
MIT License
105 stars 64 forks source link

Basic tests for ERC998NFTEnumerable / ERC998FTEnumerable #12

Closed achadha235 closed 6 years ago

achadha235 commented 6 years ago

Heyo

Problem: Need test for ERC998NFTEnumerable / ERC998FTEnumerable

Solution: Add some coverage for these interfaces.

Basic idea is to setup a set of SampleNFTs/SampleERC20s, add them to a composable and then use enumeration to find / remove them.

New Tests

✓ should return the correct number of totalTokenContracts and balances after ERC20 contracts are added (2179ms)
✓ should return the correct number of totalChildTokens and totalChildTokens after NFT contracts are added (6732ms)
✓ should return the correct number of totalTokenContracts after ERC20 contracts are removed (39ms)
✓ should return the correct number of totalChildTokens and totalChildContracts when NFT contracts are removed (6381ms)

 42 passing (19s)