Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opyn 合約 unit test #5

Open
dreamwalter opened this issue Jan 19, 2022 · 0 comments
Open

Opyn 合約 unit test #5

dreamwalter opened this issue Jan 19, 2022 · 0 comments

Comments

@dreamwalter
Copy link

Opyn 合約 unit test 在 npm run ganache 後,另開 terminal 執行 npm test:unit 會成功, 執行 582 passing

"ganache": "ganache-cli -d --port 8545 --defaultBalanceEther 500"
"ganache:polygon-mainnet-fork": "ganache-cli -d --port 8545 --defaultBalanceEther 500 -f https://polygon-mainnet.infura.io/v3/<your_infura_id>",
"ganache:optimism-mainnet-fork": "ganache-cli -d --port 8545 --defaultBalanceEther 500 -f https://opt-mainnet.g.alchemy.com/v2/<your_alchemy_id>",
"ganache:arbitrum-mainnet-fork": "ganache-cli -d --port 8545 --defaultBalanceEther 500 -f https://arb-mainnet.g.alchemy.com/v2/<your_alchemy_id>",

螢幕快照 2022-01-19 21 01 20

但 Opyn 合約 unit test 在 npm run ganache:polygon-mainnet-fork 後,只成功 581 passing, 有一個test沒過, 其它 optimism 及 arbitrum 也一樣的結果

`
581 passing (14m)
1 failing

  1. Contract: Controller
    Interact with Otoken implementation v1.0.0
    should settle v1 Otoken implementation:

    AssertionError: expected '150000000' to equal '0'

    • expected - actual

    -150000000
    +0

    at /Users/dreamwalter/Desktop/Tina/GammaProtocol/test/unit-tests/controller.test.ts:5636:32
    at step (test/unit-tests/controller.test.ts:33:23)
    at Object.next (test/unit-tests/controller.test.ts:14:53)
    at fulfilled (test/unit-tests/controller.test.ts:5:58)
    at runMicrotasks ()
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    `

螢幕快照 2022-01-19 21 01 37

是否可以協助,謝謝

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant