Karma测试Angular 2 w / tsconfig.json设置备用路径

时间:2016-12-08 00:17:45

标签: angular karma-runner karma-jasmine

{ "compilerOptions": { "target": "ES5", "module": "commonjs", "emitDecoratorMetadata": true, "experimentalDecorators": true, "sourceMap": true, "noEmitHelpers": true, "baseUrl": "./src", "paths": { "cart/*": [ "app/cart/*" ], "customer/*": [ "app/customer/*" ], "device/*": [ "app/device/*" ], "services/*": [ "app/shared/services/*" ], "components/*": [ "app/shared/components/*" ], "mocks/*": [ "app/shared/mocks/*" ] } }, "compileOnSave": false, "buildOnSave": false, "awesomeTypescriptLoaderOptions": { "forkChecker": true, "useWebpackText": true } }

npm test

当我运行tsconfig.json时,由于业力在example.service.ts

中被定义为无法找到导入路径,因此我失败了

import { ExampleService } from 'services/example';

logging.handlers.RotatingFileHandler

0 个答案:

没有答案
相关问题