I am trying to use truffle to test my smart contracts and have written some test files. I am getting an error on the terminal trying to run the test and am unsure what the reason is.
I access my directory via terminal and then write:
- truffle compile
- truffle develop
So far everything runs fine. Then when I type truffle test it returns this error:
SyntaxError: Unexpected identifier at REPLServer.Interface._onLine (readline.js:280:10) at REPLServer.emit (events.js:211:7) at emitOne (events.js:116:13) at REPLServer.onLine (repl.js:468:10) at REPLServer.runBound [as eval] (domain.js:314:12) at bound (domain.js:301:14) at ReplManager.interpret (/usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-core/lib/repl.js:119:1) at Console.interpret (/usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-core/lib/console.js:164:1) at Object.runInContext (vm.js:119:10) at createScript (vm.js:80:10)
This also happens when I try to run truffle test followed by the address of the directory the test file I want to use is saved in.
Does anybody know what the problem might be? The only solutions I found for similar problems talked about it being a Windows problem. I am using a Mac though so can't apply these solutions.