global-jsdom:在Node.js中启用DOM

上传者: 42135462 | 上传时间: 2023-04-15 13:55:24 | 文件大小: 106KB | 文件类型: ZIP
全局jsdom 在Node.js中启用DOM global-jsdom将document , window和其他DOM API注入到您的Node.js环境中。 这使您可以在Node.js中运行浏览器测试。 在global设置的特定属性直接来自您已安装的jsdom版本。 安装 要求> = 12且 > = 10或以上 npm install --save-dev --save-exact jsdom global-jsdom 用法 只需调用它即可将Node.js环境转变为DOM环境。 // commonjs require ( 'global-jsdom/register' ) // or es2015 import 'global-jsdom/register' // you can now use the DOM document . body . innerHTML = 'hello

文件下载

资源详情

[{"title":"( 29 个子文件 106KB ) global-jsdom:在Node.js中启用DOM","children":[{"title":"global-jsdom-master","children":[{"title":".gitignore <span style='color:#111;'> 13B </span>","children":null,"spread":false},{"title":"README.md <span style='color:#111;'> 3.20KB </span>","children":null,"spread":false},{"title":".github","children":[{"title":"workflows","children":[{"title":"codeql-analysis.yml <span style='color:#111;'> 1.64KB </span>","children":null,"spread":false},{"title":"nodejs.yml <span style='color:#111;'> 1.12KB </span>","children":null,"spread":false}],"spread":true},{"title":"dependabot.yml <span style='color:#111;'> 143B </span>","children":null,"spread":false}],"spread":true},{"title":"test","children":[{"title":"setup.mjs <span style='color:#111;'> 53B </span>","children":null,"spread":false},{"title":"setup.js <span style='color:#111;'> 58B </span>","children":null,"spread":false},{"title":"jsdom.test.js <span style='color:#111;'> 1.99KB </span>","children":null,"spread":false},{"title":"jsdom.test.mjs <span style='color:#111;'> 2.00KB </span>","children":null,"spread":false},{"title":".eslintrc.js <span style='color:#111;'> 402B </span>","children":null,"spread":false}],"spread":true},{"title":"HISTORY.md <span style='color:#111;'> 4.14KB </span>","children":null,"spread":false},{"title":"examples","children":[{"title":"module","children":[{"title":"package.json <span style='color:#111;'> 101B </span>","children":null,"spread":false},{"title":"test-module.js <span style='color:#111;'> 127B </span>","children":null,"spread":false}],"spread":true},{"title":"package.json <span style='color:#111;'> 921B </span>","children":null,"spread":false},{"title":".babelrc <span style='color:#111;'> 46B </span>","children":null,"spread":false},{"title":"mocha","children":[{"title":"test-esm.js <span style='color:#111;'> 96B </span>","children":null,"spread":false},{"title":"test-commonjs.js <span style='color:#111;'> 101B </span>","children":null,"spread":false}],"spread":true},{"title":"yarn.lock <span style='color:#111;'> 118.42KB </span>","children":null,"spread":false},{"title":"node","children":[{"title":"test-esm.js <span style='color:#111;'> 127B </span>","children":null,"spread":false},{"title":"test-commonjs.js <span style='color:#111;'> 135B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"LICENSE <span style='color:#111;'> 1.18KB </span>","children":null,"spread":false},{"title":"commonjs","children":[{"title":"index.js <span style='color:#111;'> 1.92KB </span>","children":null,"spread":false},{"title":"register.js <span style='color:#111;'> 66B </span>","children":null,"spread":false}],"spread":true},{"title":"package.json <span style='color:#111;'> 1.88KB </span>","children":null,"spread":false},{"title":"esm","children":[{"title":"register.mjs <span style='color:#111;'> 62B </span>","children":null,"spread":false},{"title":"index.mjs <span style='color:#111;'> 1.91KB </span>","children":null,"spread":false}],"spread":true},{"title":".travis.yml <span style='color:#111;'> 72B </span>","children":null,"spread":false},{"title":"yarn.lock <span style='color:#111;'> 109.33KB </span>","children":null,"spread":false},{"title":".eslintrc.js <span style='color:#111;'> 531B </span>","children":null,"spread":false}],"spread":false}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明