Closed dimitardanailov closed 5 years ago
just a quick shot from the hip...
// needs also webpack as a framework
frameworks: ['mocha', 'webpack'],
Also if you use this especially with webcomponents maybe this can be of some inspiration? https://open-wc.org/testing/
@daKmoR
Greetings and Hi ✋
We had a conversation on Gitter. My test follows your examples: https://github.com/dimitardanailov/gmail-helper/blob/master/develop/web/src/components/labels/backgrounds/GmailLabelBackgroundColor.unittest.js
https://open-wc.org/testing configurations are 🚀 I can't use yeoman karma configurations because with them I can't run my unit test :) I've plans to make a migration line - line by because I'd like to use https://open-wc.org/testing yeoman karma configuration but my app is not ready, yet.
hey, can you maybe push a branch so that I can check the actual failing code out?
@daKmoR
I was busy last several days. I did FOSDEM 2019 :)
Please check use this version of source: https://github.com/dimitardanailov/gmail-helper/tree/webpack-karma-v5
develop/web/
contains custom elements. Quick link to karma-webpack
version -> https://github.com/dimitardanailov/gmail-helper/blob/webpack-karma-v5/develop/web/package.json#L66
If you a question or an additional information please contact me.
I copied some configs from open-wc and adjusted a few things and it started working for me.
I made a pull request with the changes: https://github.com/dimitardanailov/gmail-helper/pull/1 🤗
to clean it up and readd some of those extra plugin I will leave as your homework 😛
Greetings,
My name is Dimitar Danailov and I've been working on independent project. My projects uses custom web elements v1,
karma
,webpack
and many others: https://github.com/dimitardanailov/gmail-helper. My project usekarma-webpack
version 3Custom element v1 definition is:
karma-webpack
version doesn't have an issue to test this configuration. Version 3 has difficulties to test connection between Child and Parent. The error in this situation is:I fixed my problem with this "patch":
Examples of my progress: Child -> https://github.com/dimitardanailov/gmail-helper/blob/master/develop/web/src/components/check-boxes/gmail-connected-text-fields/GmailConnectedCheckbox.js Parent -> https://github.com/dimitardanailov/gmail-helper/blob/master/develop/web/src/components/check-boxes/gmail-connected-text-fields/GmailConnectedTextFields.js
I had a conversation with @daKmoR. He gave me an advice to update my version from version 3 to version 5
Before twenty minutes I've updated my configurations from
karma-version 3
tokarma-version 5
.My karma configurations are:
with these configurations and karma version 5 I can't run mu tests:
Log output is:
I'm frankly with you guys. The log output for me is not useful and I'd like to discuss with this group my issue.
Screenshot with version 3:
If you someone wants more information: I'll be happy to provide.