Code Monkey home page Code Monkey logo

Comments (8)

monounity avatar monounity commented on June 15, 2024 1

@jtesser, @StefH, @kutynko: There is support for angular2 and automatic loading of imported modules from node_modules in the upcoming 2.1 release, if you want to try it out you can pull in the latest from this repo in your package.json:

"karma-typescript": "git://github.com/monounity/karma-typescript.git#2.1"

There are examples for running unit tests with angular2 in the integration tests, please look at the karma.conf.angular2.js and the package.json files.

Integration tests for [email protected]
Integration tests for Typescript@latest

A beta release for 2.1 is expected within the next week or two, you can follow progress and status in the wiki.

Please report any bugs you find as separate issues, that way I can keep track of everything, and give you credit in the release notes.

from karma-typescript.

monounity avatar monounity commented on June 15, 2024

At first glance it looks like you need to add the angular files to the karma file list, but I suspect you will run into this karma-commonjs issue: karma-runner/karma-commonjs#29. I'll take a look, it's probably easy to reproduce this error.

from karma-typescript.

StefH avatar StefH commented on June 15, 2024

Thanks for the investigation. Really helpful.

If I get this working, I do not need to use the web solution.

Other question : Did you also get debugging in vscode?

from karma-typescript.

monounity avatar monounity commented on June 15, 2024

I'm using Atom mostly, do you mean debugging unit tests?

from karma-typescript.

StefH avatar StefH commented on June 15, 2024

Yes indeed. Debugging unit tests.

If Atom is working for you, I guess VS Code will also be ok.

-----Oorspronkelijk bericht-----
Van: "monounity" [email protected]
Verzonden: ‎19-‎9-‎2016 04:14
Aan: "monounity/karma-typescript" [email protected]
CC: "Stef Heyenrath" "Author" [email protected]
Onderwerp: Re: [monounity/karma-typescript] When using your example settings, Icannot unit test code which uses Angular2 ? (#10)

I'm using Atom mostly, do you mean debugging unit tests?

You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

from karma-typescript.

monounity avatar monounity commented on June 15, 2024

As I suspected this was easy to reproduce, I'll try to create a working example!

from karma-typescript.

monounity avatar monounity commented on June 15, 2024

This is a commojs bridge issue, it wasn't designed to load from node_modules. I'm trying to create a custom module loader at the moment, it's the same issue as in #11.

from karma-typescript.

jtesser avatar jtesser commented on June 15, 2024

is there are workaround here? I am using latest karma-typescript and having the same issues?

Can I add something to the files in karma config for node_modules?

getting this which I think is the same error

  Uncaught Error: Could not find module '@angular/core' from '/Users/jasontesser/dev/git/dotJS/core/app.config.js'
  at node_modules/karma-commonjs/client/commonjs_bridge.js:85

Chrome 53.0.2785 (Mac OS X 10.12.0) ERROR
  Uncaught Error: Could not find module '@angular/core' from '/Users/jasontesser/dev/git/dotJS/core/app.config.js'
  at node_modules/karma-commonjs/client/commonjs_bridge.js:85

from karma-typescript.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.