Running tests
kristoferjoseph opened this issue · 4 comments
When i run npm test
get this error:
SyntaxError: Unexpected character '```' (10:13)
I added the yo-yoify
transform to the wzrd
call thinking that might fix it, but still seeing the error.
Have you ran into this?
I only had to npm install -g browserify
, but afterwards when I run npm test
the cli output is
∴ yo-yo (add/browserify) : npm test
> yo-yo@1.2.1 test /Users/julian/dev/maxogden/yo-yo
> wzrd test.js
server started at:
http://127.0.0.1:9966
http://10.0.1.7:9966
{"url":"/","type":"generated","time":"2016-06-26T18:02:25.823Z"}
{"url":"/test.js","type":"bundle","command":"browserify test.js","elapsed":"1125ms","time":"2016-06-26T18:02:27.036Z"}
And the browser output is
TAP version 13
test.js:6966 # event attribute gets updated
test.js:6966 ok 1 called a
test.js:6966 ok 2 called b
test.js:6966 # event attribute gets removed
test.js:6966 ok 3 called a
test.js:6966 # custom event listeners and properties are ignored
test.js:6966 ok 4 called a
test.js:6966 ok 5 no el.foo
test.js:6966 ok 6 called b
test.js:6966 # input values get copied
test.js:6966 ok 7 should be equal
test.js:6966
test.js:6966 1..7
test.js:6966 # tests 7
test.js:6966 # pass 7
test.js:6966
test.js:6966 # ok
test.js:6966
So for me it's working as expected. Maybe you just need to update your version of browserify?
Shameless plug: You get the test output straight in the CLI if you run the tests using tape-run:
$ npm install -g tape-run
$ browserify test.js | tape-run
TAP version 13
# event attribute gets updated
ok 1 called a
ok 2 called b
# event attribute gets removed
ok 3 called a
# custom event listeners and properties are ignored
ok 4 called a
ok 5 no el.foo
ok 6 called b
# input values get copied
ok 7 should be equal
1..7
# tests 7
# pass 7
# ok
$ echo $?
0
Does your installed node version support template literals?
@santiagogil that seems like the most likely culprit, but I am running node version v6.2.2, latest browserify and tape.
Ok, not sure what fixed this for me, but I ran rm -rf node_modules
then npm install
and everything works now ¯_(ツ)_/¯