강의

멘토링

커뮤니티

Cộng đồng Hỏi & Đáp của Inflearn

Hình ảnh hồ sơ của cccx44835
cccx44835

câu hỏi đã được viết

Ethereum đang hoạt động! Phát triển Dapp xổ số cho người mới bắt đầu

Triển khai và thử nghiệm hàm isMatch của Lottery

안녕하세요 강의 정말 잘듣고있습니다.

Viết

·

470

1

잘 따라오고 있다가 오늘 이벤트가 발생하지 않은 오류가 나왔습니다.

Contract: Lottery

    isMatch

      1) should be BettingResult.Win when two characters match

    > No events were emitted

      2) should be BettingResult.Fail when two characters match

    > No events were emitted

      3) should be BettingResult.Draw when two characters match

    > No events were emitted

 

 

  0 passing (229ms)

  3 failing

 

  1) Contract: Lottery

       isMatch

         should be BettingResult.Win when two characters match:

     AssertionError: expected <BN: 0> to equal 1

      at Context.<anonymous> (test/Lottery.test.js:60:14)

      at processTicksAndRejections (node:internal/process/task_queues:96:5)

 

  2) Contract: Lottery

       isMatch

         should be BettingResult.Fail when two characters match:

     AssertionError: expected <BN: 2> to equal 0

      at Context.<anonymous> (test/Lottery.test.js:65:14)

      at processTicksAndRejections (node:internal/process/task_queues:96:5)

 

  3) Contract: Lottery

       isMatch

         should be BettingResult.Draw when two characters match:

     AssertionError: expected <BN: 0> to equal 2

      at Context.<anonymous> (test/Lottery.test.js:70:14)

      at processTicksAndRejections (node:internal/process/task_queues:96:5)

 

무슨 문제인지 찾을수가 없네요 ㅠㅠ

 

Ethereumdapp

Câu trả lời 1

0

cccx44835님의 프로필 이미지
cccx44835
Người đặt câu hỏi

고쳤습니다.. let blockHash 값을 제가 가지고 온 해쉬값을 넣었다가 난 오류인거같습니다..

저도 같은 이유로 테스트 통과가 되지 않네요.. 어떻게 해결하셨나요?

Hình ảnh hồ sơ của cccx44835
cccx44835

câu hỏi đã được viết

Đặt câu hỏi