jest-environment-jsdom-latest:玩笑环境使用最新的jsdom API和功能

时间:2021-04-29 12:00:03
【文件属性】:
文件名称:jest-environment-jsdom-latest:玩笑环境使用最新的jsdom API和功能
文件大小:140KB
文件格式:ZIP
更新时间:2021-04-29 12:00:03
testing environment jest jsdom latest 笑话环境jsdom最新 在Jest环境中使用最新的jsdom API和功能。 安装 npm install jest-environment-jsdom-latest 用法 在index.spec.js或任何版本中: /** * @jest -environment jsdom-latest */ test ( 'use the latest jsdom features in this test file' , ( ) => { const element = document . createElement ( 'div' ) ; expect ( element ) . not . toBeNull ( ) ; } ) ; 动机 从v10开始, jsdom具有新的API和一些很酷的新功能。 缺点是现在它需要Node版本> = 6。 如Jest文档( here )中所
【文件预览】:
jest-environment-jsdom-latest-main
----.gitignore(19B)
----tsconfig.tsbuildinfo(101KB)
----tsconfig.json(882B)
----README.md(3KB)
----CHANGELOG.md(606B)
----package.json(2KB)
----src()
--------__mocks__()
--------__tests__()
--------index.ts(4KB)
----.babelrc(328B)
----scripts()
--------babel-plugin-jest-require-outside-vm.js(1KB)
--------babel-plugin-jest-native-globals.js(4KB)
--------build.js(5KB)
--------buildTs.js(6KB)
--------babel-plugin-jest-replace-ts-require-assignment.js(823B)
--------buildUtils.js(3KB)
----.npmignore(81B)
----babel.config.js(2KB)
----yarn.lock(119KB)
----package-lock.json(304KB)

网友评论