Git Product home page Git Product logo

Comments (9)

devrsi0n avatar devrsi0n commented on May 30, 2024 1

Puppeteer 就是控制浏览器,主要用来写集成测试,jest-electron-runner 可以在浏览器环境里面运行单测。

from blog-comments.

devrsi0n avatar devrsi0n commented on May 30, 2024

其实 jest 可以用 https://github.com/facebook-atom/jest-electron-runner 这个轮子跑真实浏览器环境,但 只支持 chromium,一般的单测应该是够了。

from blog-comments.

crimx avatar crimx commented on May 30, 2024

@devrsi0n 这个与 puppeteer 相比有什么优劣势?要跑真实环境很多时候是要测浏览器特性的东西,只有 chromium 不太够。

from blog-comments.

liuyib avatar liuyib commented on May 30, 2024

有些错误,npm install 没有 --dev 参数,应该是 npm install --save-devnpm install -D

from blog-comments.

crimx avatar crimx commented on May 30, 2024

@liuyib 感谢指正。从 yarn 复制过去没改好。

from blog-comments.

everlose avatar everlose commented on May 30, 2024

我这边照着搭,但是发现 src 源码里有 import ,运行起来会
'Module build failed (from ./node_modules/istanbul-instrumenter-loader/dist/cjs.js):

from blog-comments.

everlose avatar everlose commented on May 30, 2024

大哥,你能贴上你的 karma, karma-webpack,node ,ts-loader 的版本么,不胜感激。
看起来 karma-webpack 配合 webpack 5 翻译ts会爆很奇怪的错误,我看了很多 issue,但是没有帮助。

from blog-comments.

crimx avatar crimx commented on May 30, 2024

@everlose 我之前在这个项目中配过 https://github.com/crimx/get-selection-more

from blog-comments.

everlose avatar everlose commented on May 30, 2024

感谢楼主。提醒大家,webpack5 和 karma-webpack5 的配合太令人头痛了,它卡了我三天,找了很多 issue 都解决不了。建议都降版本。

npm install karma-webpack@4 webpack@4 ts-loader@7

from blog-comments.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.