pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

    <bdo id='CbQL1'></bdo><ul id='CbQL1'></ul>
  • <legend id='CbQL1'><style id='CbQL1'><dir id='CbQL1'><q id='CbQL1'></q></dir></style></legend>

        <i id='CbQL1'><tr id='CbQL1'><dt id='CbQL1'><q id='CbQL1'><span id='CbQL1'><b id='CbQL1'><form id='CbQL1'><ins id='CbQL1'></ins><ul id='CbQL1'></ul><sub id='CbQL1'></sub></form><legend id='CbQL1'></legend><bdo id='CbQL1'><pre id='CbQL1'><center id='CbQL1'></center></pre></bdo></b><th id='CbQL1'></th></span></q></dt></tr></i><div class="rvl7zl7" id='CbQL1'><tfoot id='CbQL1'></tfoot><dl id='CbQL1'><fieldset id='CbQL1'></fieldset></dl></div>
        <tfoot id='CbQL1'></tfoot>

        <small id='CbQL1'></small><noframes id='CbQL1'>

      1. 如何覆蓋伊斯坦布爾的 React jsx 文件?

        How to cover React jsx files in Istanbul?(如何覆蓋伊斯坦布爾的 React jsx 文件?)

        1. <i id='rtb2h'><tr id='rtb2h'><dt id='rtb2h'><q id='rtb2h'><span id='rtb2h'><b id='rtb2h'><form id='rtb2h'><ins id='rtb2h'></ins><ul id='rtb2h'></ul><sub id='rtb2h'></sub></form><legend id='rtb2h'></legend><bdo id='rtb2h'><pre id='rtb2h'><center id='rtb2h'></center></pre></bdo></b><th id='rtb2h'></th></span></q></dt></tr></i><div class="f7zpv7x" id='rtb2h'><tfoot id='rtb2h'></tfoot><dl id='rtb2h'><fieldset id='rtb2h'></fieldset></dl></div>

          <small id='rtb2h'></small><noframes id='rtb2h'>

        2. <legend id='rtb2h'><style id='rtb2h'><dir id='rtb2h'><q id='rtb2h'></q></dir></style></legend>

            <tfoot id='rtb2h'></tfoot>

                <tbody id='rtb2h'></tbody>
                  <bdo id='rtb2h'></bdo><ul id='rtb2h'></ul>

                • 本文介紹了如何覆蓋伊斯坦布爾的 React jsx 文件?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  我正在嘗試將我現有的測試流程集成到現在包含 React,但我在代碼覆蓋率部分上苦苦掙扎.通過遵循這個項目/教程,我已經能夠讓我的單元測試正常工作 - https://github.com/danvk/mocha-react - http://www.hammerlab.org/2015/02/14/testing-react-web-apps-with-mocha/

                  I'm trying to integrate my existing test processes to now include React, but am struggling on the code coverage part. I've been able to get my unit tests working fine by following this project/tutorial - https://github.com/danvk/mocha-react - http://www.hammerlab.org/2015/02/14/testing-react-web-apps-with-mocha/

                  我一直在使用伊斯坦布爾來覆蓋我的節點代碼,它運行良好.但是,我無法讓它覆蓋我在測試中使用的 jsx 文件.

                  I've been using Istanbul to cover my node code and it's working pretty well. However, I'm having trouble getting it to cover the jsx files that I'm using in my tests.

                  這是一個現有伊斯坦布爾任務的示例,它在 vanilla js(節點后端代碼)上也可以正常運行

                  Here's an example of an existing Istanbul task, which also runs fine on vanilla js (node backend code)

                  var mocha = require('gulp-mocha');
                  var istanbul = require('gulp-istanbul');
                  
                  gulp.task('test-api', function (cb) {
                   gulp.src(['api/**/*.js'])
                   .pipe(istanbul()) // Covering files
                   .pipe(istanbul.hookRequire()) // Force `require` to return covered files
                   .on('finish', function () {
                   gulp.src(['test/api/*.js'])
                   .pipe(mocha())
                   .pipe(istanbul.writeReports()) // Creating the reports after tests runned
                   .on('end', cb);
                  

                  我的問題(我認為)是我無法讓伊斯坦布爾識別 jsx 文件,或者它們沒有與測試中運行的文件進行比較.我嘗試使用 gulp-react 模塊 將 jsx 預編譯為 js,以便伊斯坦布爾可以使用它,但我'不確定它是否有效.它沒有以某種方式被覆蓋,我不確定問題出在哪里.

                  My issue ( i think ) is I can't get Istanbul to recognize the jsx files or they're not being compared to what was run in the tests. I tried using the gulp-react module to precompile the jsx to js so it can be used by Istanbul, but I'm not sure if it's working. It's not being covered somehow and I'm not sure where the issue is.

                  var mocha = require('gulp-mocha');
                  var istanbul = require('gulp-istanbul');
                  var react = require('gulp-react');
                  
                  gulp.task('test-site-example', function (cb) {
                   gulp.src(["site/jsx/*.jsx"])   //Nothing is being reported by Istanbul (not being picked up)
                   .pipe(react())      //converts the jsx to js and I think pipes the output to Istanbul
                   .pipe(istanbul())
                  
                   .pipe(istanbul.hookRequire()) // Force `require` to return covered files
                   .on('finish', function () {
                   gulp.src(['test/site/jsx/*.js'], {  //tests run fine in mocha, but nothing being shown as reported by mocha (not covered)
                   read: false
                   })
                   .pipe(mocha({
                   reporter: 'spec'
                   }))
                   .pipe(istanbul.writeReports())
                   .on('end', cb);
                   });
                   ;
                  });
                  

                  任何想法我做錯了什么?或者關于如何將測試運行器(最好是伊斯坦布爾)集成到 Gulp-Mocha-React 項目中的任何線索?

                  Any ideas what I'm doing wrong? Or any clue on how to integrate a test runner (preferably Istanbul) into a Gulp-Mocha-React project?

                  推薦答案

                  有一個庫你可以看看,gulp-jsx-coverage (https://github.com/zordius/gulp-jsx-coverage).

                  There is a library you can take a look at, gulp-jsx-coverage (https://github.com/zordius/gulp-jsx-coverage).

                  這篇關于如何覆蓋伊斯坦布爾的 React jsx 文件?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Browserify, Babel 6, Gulp - Unexpected token on spread operator(Browserify,Babel 6,Gulp - 傳播運算符上的意外令牌)
                  Is it possible to pass a flag to Gulp to have it run tasks in different ways?(是否可以將標志傳遞給 Gulp 以使其以不同的方式運行任務?)
                  Why do we need to install gulp globally and locally?(為什么我們需要在全局和本地安裝 gulp?)
                  How to run Gulp tasks sequentially one after the other(如何一個接一個地依次運行 Gulp 任務)
                  Stylesheet not loaded because of MIME-type(由于 MIME 類型而未加載樣式表)
                  Visual Studio 2015 crashes when opening Javascript files(打開 Javascript 文件時 Visual Studio 2015 崩潰)

                  <legend id='VPxmh'><style id='VPxmh'><dir id='VPxmh'><q id='VPxmh'></q></dir></style></legend>
                    <tbody id='VPxmh'></tbody>

                  <small id='VPxmh'></small><noframes id='VPxmh'>

                  <tfoot id='VPxmh'></tfoot>

                    • <bdo id='VPxmh'></bdo><ul id='VPxmh'></ul>
                      <i id='VPxmh'><tr id='VPxmh'><dt id='VPxmh'><q id='VPxmh'><span id='VPxmh'><b id='VPxmh'><form id='VPxmh'><ins id='VPxmh'></ins><ul id='VPxmh'></ul><sub id='VPxmh'></sub></form><legend id='VPxmh'></legend><bdo id='VPxmh'><pre id='VPxmh'><center id='VPxmh'></center></pre></bdo></b><th id='VPxmh'></th></span></q></dt></tr></i><div class="5fjrftv" id='VPxmh'><tfoot id='VPxmh'></tfoot><dl id='VPxmh'><fieldset id='VPxmh'></fieldset></dl></div>

                            主站蜘蛛池模板: 精密五金冲压件_深圳五金冲压厂_钣金加工厂_五金模具加工-诚瑞丰科技股份有限公司 | 深圳公司注册-工商注册代理-注册公司流程和费用_护航财税 | 常州翔天实验仪器厂-恒温振荡器-台式恒温振荡器-微量血液离心机 恒温恒湿箱(药品/保健品/食品/半导体/细菌)-兰贝石(北京)科技有限公司 | 超声波清洗机_超声波清洗机设备_超声波清洗机厂家_鼎泰恒胜 | ★店家乐|服装销售管理软件|服装店收银系统|内衣店鞋店进销存软件|连锁店管理软件|收银软件手机版|会员管理系统-手机版,云版,App | 美名宝起名网-在线宝宝、公司、起名平台| 兰州UPS电源,兰州山特UPS-兰州万胜商贸 | 北京租车牌|京牌指标租赁|小客车指标出租 | 冷镦机-多工位冷镦机-高速冷镦机厂家-温州金诺机械设备制造有限公司 | 广东燎了网络科技有限公司官网-网站建设-珠海网络推广-高端营销型外贸网站建设-珠海专业h5建站公司「了了网」 | 提升海外网站流量,增加国外网站访客UV,定制海外IP-访客王 | 北京网站建设首页,做网站选【优站网】,专注北京网站建设,北京网站推广,天津网站建设,天津网站推广,小程序,手机APP的开发。 | 上海盐水喷雾试验机_两厢式冷热冲击试验箱-巨怡环试 | 诺冠气动元件,诺冠电磁阀,海隆防爆阀,norgren气缸-山东锦隆自动化科技有限公司 | 东莞动力锂电池保护板_BMS智能软件保护板_锂电池主动均衡保护板-东莞市倡芯电子科技有限公司 | Brotu | 关注AI,Web3.0,VR/AR,GPT,元宇宙区块链数字产业 | 分类168信息网 - 分类信息网 免费发布与查询 | 婚博会2024时间表_婚博会门票领取_婚博会地址-婚博会官网 | 定制奶茶纸杯_定制豆浆杯_广东纸杯厂_[绿保佳]一家专业生产纸杯碗的厂家 | atcc网站,sigma试剂价格,肿瘤细胞现货,人结肠癌细胞株购买-南京科佰生物 | 分子精馏/精馏设备生产厂家-分子蒸馏工艺实验-新诺舜尧(天津)化工设备有限公司 | 净化车间_洁净厂房_净化公司_净化厂房_无尘室工程_洁净工程装修|改造|施工-深圳净化公司 | 济南保安公司加盟挂靠-亮剑国际安保服务集团总部-山东保安公司|济南保安培训学校 | 巨野电机维修-水泵维修-巨野县飞宇机电维修有限公司 | 正压送风机-多叶送风口-板式排烟口-德州志诺通风设备 | 小青瓦丨古建筑瓦丨青瓦厂家-宜兴市徽派古典建筑材料有限公司 | 复盛空压机配件-空气压缩机-复盛空压机(华北)总代理 | 柔软云母板-硬质-水位计云母片组件-首页-武汉长丰云母绝缘材料有限公司 | 北京网站建设公司_北京网站制作公司_北京网站设计公司-北京爱品特网站建站公司 | 北京开业庆典策划-年会活动策划公司-舞龙舞狮团大鼓表演-北京盛乾龙狮鼓乐礼仪庆典策划公司 | 代理记账_免费注册公司_营业执照代办_资质代办-【乐财汇】 | 广州云仓代发-昊哥云仓专业电商仓储托管外包代发货服务 | 合肥防火门窗/隔断_合肥防火卷帘门厂家_安徽耐火窗_良万消防设备有限公司 | 广州工业氧气-工业氩气-工业氮气-二氧化碳-广州市番禺区得力气体经营部 | 环氧乙烷灭菌器_压力蒸汽灭菌器_低温等离子过氧化氢灭菌器 _低温蒸汽甲醛灭菌器_清洗工作站_医用干燥柜_灭菌耗材-环氧乙烷灭菌器_脉动真空压力蒸汽灭菌器_低温等离子灭菌设备_河南省三强医疗器械有限责任公司 | 青岛侦探_青岛侦探事务所_青岛劝退小三_青岛调查出轨取证公司_青岛婚外情取证-青岛探真调查事务所 | 小型数控车床-数控车床厂家-双头数控车床 | PVC地板|PVC塑胶地板|PVC地板厂家|地板胶|防静电地板-无锡腾方装饰材料有限公司-咨询热线:4008-798-128 | 一体式钢筋扫描仪-楼板测厚仪-裂缝检测仪-泰仕特(北京) | 微信小程序定制,广州app公众号商城网站开发公司-广东锋火 | 杭州代理记账多少钱-注册公司代办-公司注销流程及费用-杭州福道财务管理咨询有限公司 |