I see many examples are happily using async/await in their JS tests, but it looks like mine doesn't seem to be using ES8? I'm not sure how to check.
I installed truffle using "npm install truffle" yesterday.
tests/MyToken.js:
...
beforeEach(async function() {
instance = await MyToken.new();
});
...
Test output:
$ truffle test
Using network 'development'.
/Users/.../truffle/test/MyToken.js:13
beforeEach(async function() {
^^^^^
SyntaxError: missing ) after argument list
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at /Users/.../node_modules/mocha/lib/mocha.js:231:27