是否可以使用 Jest 或任何其他测试 library/framework 加载 url 并让浏览器呈现 DOM 对象?
Is it possible to load url and get the browser rendered DOM object using Jest or any other testing library/framework?
我想让浏览器呈现 DOM 对象而不是模拟 DOM 对象。是否可以加载 url 并使用 Jest 或任何其他单元测试 library/framework 获取浏览器呈现的 DOM 对象?
您可以为此使用 https://github.com/GoogleChrome/puppeteer,它会让您访问 document
对象。
还有https://github.com/smooth-code/jest-puppeteer为了更好的和jest整合
我想让浏览器呈现 DOM 对象而不是模拟 DOM 对象。是否可以加载 url 并使用 Jest 或任何其他单元测试 library/framework 获取浏览器呈现的 DOM 对象?
您可以为此使用 https://github.com/GoogleChrome/puppeteer,它会让您访问 document
对象。
还有https://github.com/smooth-code/jest-puppeteer为了更好的和jest整合