karma-typescript

karma-typescript: import JS file with Async keyword

不羁岁月 提交于 2020-01-14 07:48:11
问题 I'm using karma-typescript, with this karma config file : karmaTypescriptConfig: { compilerOptions: { target: "es5", lib: ["dom", "es2015", "es2017"] }, bundlerOptions: { transforms: [require("karma-typescript-es6-transform")()] } }, In my spec files, I have this code : import {} from './local/lib.js' In my lib.js, I have this code : async function() {} When executing my tests with npm test , I have this error : ERROR [source-reader.karma-typescript] Error parsing code: Unexpected token (X:Y)

How to setup NativeScript Angular with Karma, karma-typescript, Jasmine, Mocha, Chai

吃可爱长大的小学妹 提交于 2019-12-10 13:46:47
问题 I'm trying to configure karma.config.js to run with NativeScript Angular project following the official doc: https://docs.nativescript.org/angular/tooling/testing The problem is the tests always failed and always running node_modules/ and platforms/ too but I mentioned them in excludeFiles property. I created a github repo to reproduce it I'm using a separated branches to reproduce it with jasmine and mocha https://github.com/francisrod01/native-script-angular2-karma-demo Scenario 1: karma