久久久久久久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>

        您如何將伊斯坦布爾代碼覆蓋率與轉譯的 Typesc

        How do you use Istanbul Code Coverage with transpiled Typescript?(您如何將伊斯坦布爾代碼覆蓋率與轉譯的 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'>

                  本文介紹了您如何將伊斯坦布爾代碼覆蓋率與轉譯的 Typescript 一起使用?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  我整個上午都在閱讀有關這方面的文章,試圖正確設置我的環境.但由于某種原因,我沒有得到它.我的設置-

                  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
                  

                  測試運行良好,并且 chrome 調試器中的映射調試被正確映射.但伊斯坦布爾將 typescripts.js 文件視為一個文件,而不是幾十個其他文件的串聯.

                  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.源碼(不包括測試)被轉譯成前面提到的typescripts.js,測試被單獨轉譯并復制到/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 具有內聯源映射.使用 sourcemap,十幾個 ts 文件大小為 106kb.

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

                  所以從這里開始測試和調試工作正常.

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

                  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']
                  },
                  

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

                  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.

                  有人讓這個工作嗎?有什么想法我可能做錯了嗎?

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

                  推薦答案

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

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

                  Sitepan 上的文章 對其進行了更詳細的描述:

                  The article on Sitepan describes it in more detail:

                  Intern 以及其他 JavaScript 測試框架都使用了伊斯坦布爾用于他們的代碼覆蓋率分析.隨著我們開始越來越多地采用TypeScript 用于我們自己的項目,我們繼續努力獲得清楚地了解我們的代碼覆蓋率,因為所有報告僅包括在內我們發出的代碼的覆蓋率.我們不得不嘗試使用編譯器在我們的腦海中試圖找出我們缺少測試覆蓋的地方.我們還喜歡圍繞我們的覆蓋范圍設置指標,讓我們跟蹤我們是否正朝著正確的方向前進.

                  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.

                  我們中的一些人開始探索我們如何能夠完成將覆蓋率報告映射回其起源并經過一段時間工作,我們創建了 remap-istanbul,一個允許伊斯坦布爾的包覆蓋信息被映射回其源,當有源地圖可用.雖然我們一直專注于 TypeScript,但它可以在任何對發射代碼產生覆蓋的地方使用,包括上面提到的工具!

                  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!

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

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

                  這篇關于您如何將伊斯坦布爾代碼覆蓋率與轉譯的 Typescript 一起使用?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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 崩潰)
                  <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>

                            主站蜘蛛池模板: 色综合天天天天做夜夜夜夜做 | www.日韩| 欧美激情一区二区 | 五月激情六月婷婷 | 国产精品久久久久久久久久 | 欧美电影大全 | 色欧美综合 | 亚洲国产成人精品女人久久久 | 久久精品国产一区 | 黄色毛片免费看 | 免费三级黄 | 免费国产一区二区 | 欧美另类视频在线 | 热re99久久精品国99热观看 | 在线āv视频 | 人和拘一级毛片c | 亚洲欧美视频一区 | av在线免费观看网址 | 欧美群妇大交群中文字幕 | 久久99国产精品 | 在线国产99| 亚洲欧美日本在线 | 午夜亚洲 | 黑人巨大精品欧美一区二区一视频 | 一级视频黄色 | 亚洲一区二区三区在线 | 国产夜恋视频在线观看 | 日韩一二区在线观看 | 亚洲精品久久久蜜桃 | 中文字幕日本一区二区 | 99精品一级欧美片免费播放 | 亚洲综合无码一区二区 | 91免费视频观看 | 成人激情视频在线观看 | 在线日韩福利 | 天堂在线www | 日韩黄色免费 | 美女视频h | 成人黄色在线观看 | 国产又爽又黄的视频 | 夜夜av|