2
在:jsdom虛擬控制檯:類型錯誤:jsdom.createVirtualConsole不是一個函數
const jsdom = require("jsdom");
const initialVirtualConsole = jsdom.createVirtualConsole();
我得到:
TypeError: jsdom.createVirtualConsole is not a function
at Query.<anonymous> (/my_jsdom_script.js:112:55)
at emitNone (events.js:72:20)
at Query.emit (events.js:166:7)
at Query.Sequence.end (/Users/xxx/Sites/node_modules/mysql/lib/protocol/sequences/Sequence.js:99:12)
at Query._handleFinalResultPacket (/Users/xxx/Sites/node_modules/mysql/lib/protocol/sequences/Query.js:144:8)
at Query.EofPacket (/Users/xxx/Sites/node_modules/mysql/lib/protocol/sequences/Query.js:128:8)
at Protocol._parsePacket (/Users/xxx/Sites/node_modules/mysql/lib/protocol/Protocol.js:280:23)
at Parser.write (/Users/xxx/Sites/node_modules/mysql/lib/protocol/Parser.js:73:12)
at Protocol.write (/Users/xxx/Sites/node_modules/mysql/lib/protocol/Protocol.js:39:16)
at Socket.<anonymous> (/Users/xxx/Sites/node_modules/mysql/lib/Connection.js:96:28)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at readableAddChunk (_stream_readable.js:146:16)
at Socket.Readable.push (_stream_readable.js:110:10)
at TCP.onread (net.js:523:20)
我想我的本地機器上運行jsdom的測試,看看jsdom如何在我的本地環境中執行。
任何人都可以如此優秀地指導一個noob在https://github.com/tmpvar/jsdom/tree/master/test運行測試?
你使用的jsdom的版本? –
jsdom/tree/master ...所以一個移動的目標。 – baychae