久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    <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="qwawimqqmiuu" 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="qwawimqqmiuu" 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 文件?的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                  問(wèn)題描述

                  限時(shí)送ChatGPT賬號(hào)..

                  我正在嘗試將我現(xiàn)有的測(cè)試流程集成到現(xiàn)在包含 React,但我在代碼覆蓋率部分上苦苦掙扎.通過(guò)遵循這個(gè)項(xiàng)目/教程,我已經(jīng)能夠讓我的單元測(cè)試正常工作 - 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/

                  我一直在使用伊斯坦布爾來(lái)覆蓋我的節(jié)點(diǎn)代碼,它運(yùn)行良好.但是,我無(wú)法讓它覆蓋我在測(cè)試中使用的 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.

                  這是一個(gè)現(xiàn)有伊斯坦布爾任務(wù)的示例,它在 vanilla js(節(jié)點(diǎn)后端代碼)上也可以正常運(yùn)行

                  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);
                  

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

                  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);
                   });
                   ;
                  });
                  

                  任何想法我做錯(cuò)了什么?或者關(guān)于如何將測(cè)試運(yùn)行器(最好是伊斯坦布爾)集成到 Gulp-Mocha-React 項(xiàng)目中的任何線索?

                  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?

                  推薦答案

                  有一個(gè)庫(kù)你可以看看,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).

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

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

                  相關(guān)文檔推薦

                  Browserify, Babel 6, Gulp - Unexpected token on spread operator(Browserify,Babel 6,Gulp - 傳播運(yùn)算符上的意外令牌)
                  Is it possible to pass a flag to Gulp to have it run tasks in different ways?(是否可以將標(biāo)志傳遞給 Gulp 以使其以不同的方式運(yùn)行任務(wù)?)
                  Why do we need to install gulp globally and locally?(為什么我們需要在全局和本地安裝 gulp?)
                  How to run Gulp tasks sequentially one after the other(如何一個(gè)接一個(gè)地依次運(yùn)行 Gulp 任務(wù))
                  Stylesheet not loaded because of MIME-type(由于 MIME 類型而未加載樣式表)
                  Visual Studio 2015 crashes when opening Javascript files(打開(kāi) Javascript 文件時(shí) 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="qwawimqqmiuu" id='VPxmh'><tfoot id='VPxmh'></tfoot><dl id='VPxmh'><fieldset id='VPxmh'></fieldset></dl></div>

                            主站蜘蛛池模板: 欧美在线观看一区 | 欧美激情视频一区二区三区在线播放 | 亚洲精品4 | 日本精品久久久久久久 | 男女羞羞视频免费看 | 欧美区日韩区 | аⅴ资源新版在线天堂 | 久草资源在线视频 | 在线观看深夜视频 | 国产精品毛片一区二区在线看 | 一区二区在线 | 精品无码久久久久久国产 | 久久久久久网站 | 日韩三区在线 | 在线免费观看毛片 | 久久亚洲精品久久国产一区二区 | 日韩一区二区在线视频 | 久草福利| 国产精品久久久久久久久久久久久久 | 欧美aaaaa | 成人在线国产 | 国产亚洲欧美在线 | 欧美视频一级 | 日韩一二区在线 | 国产高清一区二区三区 | 成人免费网站www网站高清 | 免费av直接看 | www.久草| 国产精品久久久久一区二区三区 | 日韩av中文 | 国产高清在线 | 围产精品久久久久久久 | 中文字幕男人的天堂 | 欧美精品a∨在线观看不卡 国产精品久久国产精品 | 欧美日韩在线观看视频网站 | 免费黄色在线观看 | 欧洲一级黄 | 国产成人精品免高潮在线观看 | 一区二区在线看 | 久久久九九九九 | 国产丝袜一区二区三区免费视频 |