2016-07-11 15 views
1

remap istanbul를 사용하여 내 TypeScript 프로젝트의 코드 범위를 얻으려고합니다. 그러나 async/await를 사용하고 TypeScript가 ES5로 그 코드를 추출하는 것을 지원하지 않기 때문에 Babel을 사용하여이 작업을 수행하고 있습니다. 그래서 기본적으로 내 타이프 스크립트 코드는 TypeScript 컴파일러에 의해 ES6으로 옮겨져 바벨 (Babel)을 사용하여 ES5로 옮겨집니다.typescript와 babel을 사용할 때 remap istanbul

이제 커버 리지 리포트를 생성하려고 시도 할 때 TypeScript에 의해 생성 된 JavaScript 파일을로드하지 못합니다. 왜냐하면 그 파일은 결코 만들어지지 않기 때문에 (나는 꿀꺽 꿀꺽하면서 스트레이트 핑을하고 있기 때문입니다.) 이것을 설정하는 가장 좋은 방법은 무엇입니까?

답변

0

이스탄불 1.x만이 잘 수행합니다. this repository에서

가 :

{ 
    "name": "sample-babel-node", 
    "version": "1.0.0", 
    "description": "Sample project to demonstrate source mapped coverage reports with istanbul", 
    "main": "index.js", 
    "directories": { 
    "test": "test" 
    }, 
    "scripts": { 
    "test": "babel-node ./node_modules/istanbul/lib/cli.js cover ./test/index.test.js" 
    }, 
    "repository": { 
    "type": "git", 
    "url": "git+ssh://[email protected]/istanbuljs/sample-babel-node.git" 
    }, 
    "author": "", 
    "license": "BSD-3-Clause", 
    "bugs": { 
    "url": "https://github.com/istanbuljs/sample-babel-node/issues" 
    }, 
    "homepage": "https://github.com/istanbuljs/sample-babel-node#readme", 
    "dependencies": { 
    "babel-cli": "^6.2.0", 
    "babel-preset-es2015": "^6.1.18" 
    }, 
    "devDependencies": { 
    "istanbul": "^1.0.0-alpha.2" 
    } 
} 

는 또한 this git issue 체크 아웃,이 (꿀꺽, 꿀꿀 거리는 소리 등) 더있다.

관련 문제