You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ bin/js-fuzz ../fuzz.js
TypeError: content.getContent is not a function
at Log.List.add.List.addItem.List.appendItem (/Users/macbook/dev_fuzz/js-fuzz/node_modules/blessed/lib/widgets/list.js:297:61)
at Log.List.setItems (/Users/macbook/dev_fuzz/js-fuzz/node_modules/blessed/lib/widgets/list.js:384:12)
at Log.log (/Users/macbook/dev_fuzz/js-fuzz/node_modules/blessed-contrib/lib/widget/log.js:26:8)
at Stats.<anonymous> (/Users/macbook/dev_fuzz/js-fuzz/lib/src/Stats.js:203:66)
at emitOne (events.js:96:13)
at Stats.emit (events.js:191:7)
at Stats.log (/Users/macbook/dev_fuzz/js-fuzz/lib/src/Stats.js:76:14)
at Cluster.<anonymous> (/Users/macbook/dev_fuzz/js-fuzz/lib/src/Cluster.js:149:67)
at emitOne (events.js:96:13)
at Cluster.emit (events.js:191:7)
I assume this is about a parser error in the example. Try the following instead:
constJSON5=require('json5')exports.fuzz=input=>{input=input.toString('utf8')// we give you buffers by defaultletisPlainJSON=trueletisJSON5=truetry{JSON.parse(input)}catch(e){isPlainJSON=false}try{JSON5.parse(input)}catch(e){isJSON5=false}// We catch and thrown errors and mark them as failuresif(isPlainJSON&&!isJSON5){thrownewError('Found a string that was JSON but not JSON5');}returnisPlainJSON ? 1 : 0}
adrianheine
added a commit
to adrianheine/js-fuzz
that referenced
this issue
Nov 3, 2017
When I try to run the example:
It appears related to this line and the blessed dependency.
The text was updated successfully, but these errors were encountered: