Closed adrianmcli closed 7 years ago
@joshma91 I'm getting errors running the tests. Here are the errors:
Compiling ./contracts/SimpleStorage.sol...
Compiling ./test/TestSimpleStorage.sol...
Compiling truffle/Assert.sol...
Compiling truffle/DeployedAddresses.sol...
TestSimpleStorage
✓ testItStoresAValue (98ms)
Contract: Avocado
1) should return the teacher & student names
> No events were emitted
2) should return addresses with specified tag
> No events were emitted
0xef2c67c9b464a7aea837a4eb42191bb668a8145152f4f980230e705cf9047407
✓ should return the meeting description (531ms)
Contract: SimpleStorage
✓ ...should store the value 89. (73ms)
3 passing (1s)
2 failing
1) Contract: Avocado should return the teacher & student names:
TypeError: Cannot read property 'fromAscii' of undefined
at teacher.tags.map.x (test/avocado.js:28:60)
at Array.map (<anonymous>)
at Context.it (test/avocado.js:28:40)
at <anonymous>
at process._tickDomainCallback (internal/process/next_tick.js:228:7)
2) Contract: Avocado should return addresses with specified tag:
TypeError: Cannot read property 'fromAscii' of undefined
at Context.it (test/avocado.js:48:48)
at <anonymous>
at process._tickDomainCallback (internal/process/next_tick.js:228:7)
@adrianmcli yep same error
@joshma91 I had to remove your web3 dependency. Since you were only using one function, I just copy and pasted it into a utils.js
file and required it from there. The tests were failing because it was using our globally installed web3 and it wasn't finding the utils.
The newest commits complete testing for Avocado.sol end-end. Tests completed & successful:
Initializing a teacher + student, and fetching this data through their addresses
Initialize different sets of tags for 2 teachers (one overlapping), calling filterByTag retrieves the expected addresses
New meeting successfully created and able to obtain ID
Trigger the completion of the meeting and view the details of the ETH transfer from an Event
Verify that getMeeting retrieves the correct details
Create several messages and retrieve a count + message content
Todo: More robust testing of payments/time tracking.
I took the last two commits (made by @kendricktan) and moved them onto this branch instead. This way, we can discuss as we go along.
Fixes #9