Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Problem running tests programmatically using Truffle v5.10.0 #6105

Closed
1 task done
calebyouki opened this issue Jun 19, 2023 · 5 comments
Closed
1 task done

Problem running tests programmatically using Truffle v5.10.0 #6105

calebyouki opened this issue Jun 19, 2023 · 5 comments

Comments

@calebyouki
Copy link

calebyouki commented Jun 19, 2023


Issue

When running tests programmatically using the code here, the following error is thrown:

TypeError:` createInTestDebugFunction is not a function
at Object.<anonymous> (/xxxx/node_modules/truffle/build/webpack:/packages/test/dist/src/Test.js:295:1)
at Generator.next (<anonymous>)
at /xxxx/node_modules/truffle/build/webpack:/packages/test/dist/src/Test.js:31:1
at new Promise (<anonymous>)
at **webpack_modules**.583725.\_\_awaiter (/xxxx/node_modules/truffle/build/webpack:/packages/test/dist/src/Test.js:27:1)
at Object.setJSTestGlobals (/xxxx/node_modules/truffle/build/webpack:/packages/test/dist/src/Test.js:265:1)
at Object.<anonymous> (/xxxx/node_modules/truffle/build/webpack:/packages/test/dist/src/Test.js:157:1)
at Generator.next (<anonymous>)
at fulfilled (/xxxx/node_modules/truffle/build/webpack:/packages/test/dist/src/Test.js:28:43)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
Truffle v5.10.0 (core: 5.10.0)
Node v16.18.1

Steps to Reproduce

Run the solidity commands in https://github.com/sc-forks/solidity-coverage/blob/0.7.22/plugins/truffle.plugin.js using truffle v5.10.0.

Expected Behavior

Contracts compile successfully and tests are run to completion.

Actual Results

The following error is thrown:

TypeError:` createInTestDebugFunction is not a function
at Object.<anonymous> (/xxxx/node_modules/truffle/build/webpack:/packages/test/dist/src/Test.js:295:1)
at Generator.next (<anonymous>)
at /xxxx/node_modules/truffle/build/webpack:/packages/test/dist/src/Test.js:31:1
at new Promise (<anonymous>)
at **webpack_modules**.583725.\_\_awaiter (/xxxx/node_modules/truffle/build/webpack:/packages/test/dist/src/Test.js:27:1)
at Object.setJSTestGlobals (/xxxx/node_modules/truffle/build/webpack:/packages/test/dist/src/Test.js:265:1)
at Object.<anonymous> (/xxxx/node_modules/truffle/build/webpack:/packages/test/dist/src/Test.js:157:1)
at Generator.next (<anonymous>)
at fulfilled (/xxxx/node_modules/truffle/build/webpack:/packages/test/dist/src/Test.js:28:43)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
Truffle v5.10.0 (core: 5.10.0)
Node v16.18.1

Environment

  • Operating System: Linux
  • Ethereum client: ganache-core: v2.13.2
  • Truffle version (truffle version): v5.10.0
  • node version (node --version): v16.18.1
  • npm version (npm --version): 8.19.2
@calebyouki
Copy link
Author

This is a follow-on issue to #6066

@eggplantzzz
Copy link
Contributor

Thanks for reporting! I'll take a look into this.

@eggplantzzz
Copy link
Contributor

So it looks like we neglected to handle the case in test when a certain function is not passed. I created a PR here that should fix this. Thanks again for reporting this @calebyouki!

@cliffoo
Copy link
Contributor

cliffoo commented Jun 23, 2023

Fixed in v5.10.1. Thanks @calebyouki!

@cliffoo cliffoo closed this as completed Jun 23, 2023
@calebyouki
Copy link
Author

Thanks @eggplantzzz and @cliffoo for your time and support! It works well now

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

No branches or pull requests

4 participants