1

ページで jsdome 実行スクリプトを取得できません:

ドキュメントのタイトルを変更するスクリプトがページにあります

var jsdom = require('jsdom');

jsdom.defaultDocumentFeatures = {
      FetchExternalResources   : ['script'],
      ProcessExternalResources : true

};

...

jsdom.env({
              html: "http://localhost:3000/page"
            }, function (err, window) {
               //Check window.document.title

}

私は何か間違ったことをしていますか?

4

0 に答える 0