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

<legend id='ZaSZG'><style id='ZaSZG'><dir id='ZaSZG'><q id='ZaSZG'></q></dir></style></legend>
  • <small id='ZaSZG'></small><noframes id='ZaSZG'>

  • <tfoot id='ZaSZG'></tfoot>

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

        您如何將伊斯坦布爾代碼覆蓋率與轉(zhuǎn)譯的 Typesc

        How do you use Istanbul Code Coverage with transpiled Typescript?(您如何將伊斯坦布爾代碼覆蓋率與轉(zhuǎn)譯的 Typescript 一起使用?)
        <tfoot id='0tWN4'></tfoot>
        <i id='0tWN4'><tr id='0tWN4'><dt id='0tWN4'><q id='0tWN4'><span id='0tWN4'><b id='0tWN4'><form id='0tWN4'><ins id='0tWN4'></ins><ul id='0tWN4'></ul><sub id='0tWN4'></sub></form><legend id='0tWN4'></legend><bdo id='0tWN4'><pre id='0tWN4'><center id='0tWN4'></center></pre></bdo></b><th id='0tWN4'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='0tWN4'><tfoot id='0tWN4'></tfoot><dl id='0tWN4'><fieldset id='0tWN4'></fieldset></dl></div>

        • <legend id='0tWN4'><style id='0tWN4'><dir id='0tWN4'><q id='0tWN4'></q></dir></style></legend>
            <bdo id='0tWN4'></bdo><ul id='0tWN4'></ul>
                <tbody id='0tWN4'></tbody>

                  <small id='0tWN4'></small><noframes id='0tWN4'>

                  本文介紹了您如何將伊斯坦布爾代碼覆蓋率與轉(zhuǎn)譯的 Typescript 一起使用?的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                  問(wèn)題描述

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

                  我整個(gè)上午都在閱讀有關(guān)這方面的文章,試圖正確設(shè)置我的環(huán)境.但由于某種原因,我沒(méi)有得到它.我的設(shè)置-

                  I've been reading articles on this all morning trying to get my environment setup correctly. But for some reason I'm not getting it. My setup-

                  /app
                      ... source (mixed js and ts)
                  /scripts
                      ... copied source (js)
                      typescripts.js // transpiled typescript with inline mapping
                  

                  測(cè)試運(yùn)行良好,并且 chrome 調(diào)試器中的映射調(diào)試被正確映射.但伊斯坦布爾將 typescripts.js 文件視為一個(gè)文件,而不是幾十個(gè)其他文件的串聯(lián).

                  Tests run fine, and with the mapping debugging in the chrome debugger is mapped correctly. But Istanbul sees the typescripts.js file as one file instead of the concatenation of dozens of other files.

                  為了生成打字稿源,我使用 gulp-typescript.源碼(不包括測(cè)試)被轉(zhuǎn)譯成前面提到的typescripts.js,測(cè)試被單獨(dú)轉(zhuǎn)譯并復(fù)制到/scripts.

                  To generate the typescript source I'm using gulp-typescript. The source (excluding tests) are transpiled to the aforementioned typescripts.js, and the tests are transpiled individually and copied to /scripts.

                    var ts = require('gulp-typescript');
                    var sourcemaps = require('gulp-sourcemaps');
                    var concat = require('gulp-concat');
                  
                    module.exports = function (gulp, config) {
                       'use strict';
                  
                       // Runs dot ts files found in `www` through the typescript compiler and copies them as js 
                       // files to the scripts directory
                  
                       gulp.task('typescript', ['typescript:tests'], function () {
                          return gulp.src(config.paths.typescript) // [ './www/app/**/*.ts', '!./www/app/**/*.test.ts', '!./www/app/**/*.mock.ts' ]
                             .pipe(sourcemaps.init())
                             .pipe(ts(ts.createProject(config.paths.tsConfig))) // './tsconfig.json'
                             .js
                             .pipe(concat(config.sourcemaps.dest)) // typescripts.js
                             .pipe(sourcemaps.write(config.sourcemaps)) // { includeContent: false, sourceRoot: '/app' } - i've also tried absolute local path
                             .pipe(gulp.dest(config.paths.tmpScripts)); // ./www/scripts
                  
                  
                       });
                  
                       gulp.task('typescript:tests', [], function() {
                          return gulp.src(config.paths.typescriptTests) // [ './www/app/**/*.test.ts', './www/app/**/*.mock.ts' ]
                             .pipe(ts(ts.createProject(config.paths.tsConfig))) // './tsconfig.json'
                             .pipe(gulp.dest(config.paths.tmpScripts)); // ./www/scripts
                       });
                    };
                  

                  生成的 typescripts.js 具有內(nèi)聯(lián)源映射.使用 sourcemap,十幾個(gè) ts 文件大小為 106kb.

                  The resulting typescripts.js has the inline sourcemap. With the sourcemap, the dozen or so ts files results in 106kb.

                  所以從這里開(kāi)始測(cè)試和調(diào)試工作正常.

                  現(xiàn)在為了讓伊斯坦布爾代碼覆蓋率正常工作,我安裝了 karma-sourcemap-loader 并將其添加到預(yù)處理器中.

                  Now in an attempt to get Istanbul code coverage working properly i've installed karma-sourcemap-loader and added it to the preprocessors.

                  preprocessors: {
                      'www/scripts/typescripts.js': ['sourcemap'],
                      'www/scripts/**/*.js': ['coverage']
                  },
                  

                  我認(rèn)為這是我需要做的.但它沒(méi)有顯示源文件的代碼覆蓋率.我嘗試了 C:/ 的絕對(duì)路徑,但這也不起作用.我還嘗試了 gulp-sourcemaps 中的不同選項(xiàng),例如添加源(將文件推送到 160kb),但也沒(méi)有.

                  I'd think this is what I'd need to do. But it does not show code coverage on the source files. I tried the absolute path from C:/ but that didn't work either. I also tried the different options in gulp-sourcemaps like adding source (which pushed the file to 160kb) but no like either.

                  有人讓這個(gè)工作嗎?有什么想法我可能做錯(cuò)了嗎?

                  Has anyone gotten this to work? Any ideas what I could be doing wrong?

                  推薦答案

                  TL;DR: 有一個(gè)工具:https://github.com/SitePen/remap-istanbul 描述為通過(guò)源地圖重新映射伊斯坦布爾覆蓋范圍的工具

                  TL;DR: There is a tool: https://github.com/SitePen/remap-istanbul described as A tool for remapping Istanbul coverage via Source Maps

                  Sitepan 上的文章 對(duì)其進(jìn)行了更詳細(xì)的描述:

                  The article on Sitepan describes it in more detail:

                  Intern 以及其他 JavaScript 測(cè)試框架都使用了伊斯坦布爾用于他們的代碼覆蓋率分析.隨著我們開(kāi)始越來(lái)越多地采用TypeScript 用于我們自己的項(xiàng)目,我們繼續(xù)努力獲得清楚地了解我們的代碼覆蓋率,因?yàn)樗袌?bào)告僅包括在內(nèi)我們發(fā)出的代碼的覆蓋率.我們不得不嘗試使用編譯器在我們的腦海中試圖找出我們?nèi)鄙贉y(cè)試覆蓋的地方.我們還喜歡圍繞我們的覆蓋范圍設(shè)置指標(biāo),讓我們跟蹤我們是否正朝著正確的方向前進(jìn).

                  Intern as well as other JavaScript testing frameworks utilise Istanbul for their code coverage analysis. As we started to adopt more and more TypeScript for our own projects, we continued to struggle with getting a clear picture of our code coverage as all the reports only included the coverage of our emitted code. We had to try to use the compilers in our minds to try to figure out where we were missing test coverage. We also like to set metrics around our coverage to let us track if we are headed the right direction.

                  我們中的一些人開(kāi)始探索我們?nèi)绾文軌蛲瓿蓪⒏采w率報(bào)告映射回其起源并經(jīng)過(guò)一段時(shí)間工作,我們創(chuàng)建了 remap-istanbul,一個(gè)允許伊斯坦布爾的包覆蓋信息被映射回其源,當(dāng)有源地圖可用.雖然我們一直專注于 TypeScript,但它可以在任何對(duì)發(fā)射代碼產(chǎn)生覆蓋的地方使用,包括上面提到的工具!

                  A couple of us started exploring how we might be able to accomplish mapping the coverage report back to its origins and after a bit of work, we created remap-istanbul, a package that allows Istanbul coverage information to be mapped back to its source when there are Source Maps available. While we have been focused on TypeScript, it can be used wherever the coverage is being produced on emitted code, including the tools mentioned above!

                  如何通過(guò) gulp 使用該工具:https://github.com/SitePen/remap-istanbul#gulp-plugin

                  How to use the tool with gulp: https://github.com/SitePen/remap-istanbul#gulp-plugin

                  這篇關(guān)于您如何將伊斯坦布爾代碼覆蓋率與轉(zhuǎn)譯的 Typescript 一起使用?的文章就介紹到這了,希望我們推薦的答案對(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 類(lèi)型而未加載樣式表)
                  Visual Studio 2015 crashes when opening Javascript files(打開(kāi) Javascript 文件時(shí) Visual Studio 2015 崩潰)
                  <tfoot id='SnHD9'></tfoot>
                  <legend id='SnHD9'><style id='SnHD9'><dir id='SnHD9'><q id='SnHD9'></q></dir></style></legend>
                  <i id='SnHD9'><tr id='SnHD9'><dt id='SnHD9'><q id='SnHD9'><span id='SnHD9'><b id='SnHD9'><form id='SnHD9'><ins id='SnHD9'></ins><ul id='SnHD9'></ul><sub id='SnHD9'></sub></form><legend id='SnHD9'></legend><bdo id='SnHD9'><pre id='SnHD9'><center id='SnHD9'></center></pre></bdo></b><th id='SnHD9'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='SnHD9'><tfoot id='SnHD9'></tfoot><dl id='SnHD9'><fieldset id='SnHD9'></fieldset></dl></div>

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

                    <tbody id='SnHD9'></tbody>
                      • <bdo id='SnHD9'></bdo><ul id='SnHD9'></ul>

                            主站蜘蛛池模板: 久久亚洲国产 | 久久99精品久久 | 999久久久久久久久6666 | 成人在线播放网址 | 午夜影院在线观看视频 | 成人婷婷 | av中文字幕在线播放 | 日韩一区二区成人 | 亚洲一区二区三区四区五区中文 | 国产丝袜一区二区三区免费视频 | 国产视频第一页 | 久草免费在线视频 | 亚洲精品一区二区三区蜜桃久 | 精品国产91亚洲一区二区三区www | 女朋友的闺蜜3韩国三级 | 精品亚洲第一 | 久久久久久久av | 午夜免费成人 | 一区二区三区亚洲 | 中文字幕av第一页 | 伊人天堂网 | h视频在线免费观看 | 国产毛片视频 | 国产精品视频网 | 日本精品免费在线观看 | 亚洲精品国产区 | 国产精品无码久久久久 | 成人毛片视频免费 | 国产高清一二三区 | 欧美在线天堂 | 自拍偷拍第一页 | 91成人免费看片 | 亚洲男人天堂 | 国产精品178页 | 亚洲精品欧洲 | 91久操视频| 欧美在线视频二区 | а天堂中文最新一区二区三区 | 伊人网站在线观看 | 欧美日韩国产精品一区二区 | 精品亚洲第一 |