eigerco / nebula

A soroban contract library
https://nebula.eiger.co
Apache License 2.0
7 stars 2 forks source link

Test with node runner #47

Closed geofmureithi closed 1 year ago

geofmureithi commented 1 year ago

Referenced issue

45

Summary of changes

Added an example to run tests with node

This outputs:

▶ Raffle Contract
  ✔ createAccounts (23697.621667ms)
Error: soroban error exit 0, error: Failed to find config network for futurenet

    at RaffleTests.runSoroban (file:///Users/geoffreymureithi/Projects/nebula/tests/contracts/basetests.ts:1:2036)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async RaffleTests.deployContract (file:///Users/geoffreymureithi/Projects/nebula/tests/contracts/basetests.ts:1:1465)
    at async TestContext.<anonymous> (file:///Users/geoffreymureithi/Projects/nebula/tests/contracts/raffle.test.ts:1:2646)
    at async Test.run (node:internal/test_runner/test:581:9)
    at async TestContext.<anonymous> (file:///Users/geoffreymureithi/Projects/nebula/tests/contracts/raffle.test.ts:1:2605)
    at async Test.run (node:internal/test_runner/test:581:9)
    at async startSubtest (node:internal/test_runner/harness:204:3)
  ✔ deployContract (71.868417ms)
error:  Error: soroban error exit 1, error: no such command: `lab`

        View all installed plugins with `soroban --list`

  ✔ getTokenId (46.24275ms)
error:  Error: soroban error exit 0, error: Failed to find config network for futurenet

  ✔ invokeInit (40.98925ms)
error:  Error: soroban error exit 0, error: Failed to find config network for futurenet

error:  Error: soroban error exit 0, error: Failed to find config network for futurenet

error:  Error: soroban error exit 0, error: Failed to find config network for futurenet

  ✔ invokeBuyTickets (123.41625ms)
error:  Error: soroban error exit 0, error: Failed to find config network for futurenet

  ✔ invokePlayRaffle (40.971958ms)
error:  Error: soroban error exit 0, error: Failed to find config network for futurenet

  ✔ checkBalance (40.768041ms)
▶ Raffle Contract (24063.782292ms)

ℹ tests 8
ℹ suites 0
ℹ pass 8
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0