Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update test framework to Angular 10 (DSP-789) #213

Merged
merged 25 commits into from
Mar 15, 2021

Conversation

tobiasschweizer
Copy link
Contributor

@tobiasschweizer tobiasschweizer commented Jul 7, 2020

@tobiasschweizer tobiasschweizer added the dependencies Pull requests that update a dependency file label Jul 7, 2020
@tobiasschweizer tobiasschweizer self-assigned this Jul 7, 2020
@tobiasschweizer
Copy link
Contributor Author

tobiasschweizer commented Jul 7, 2020

karma.conf.js:

Under the hood Karma uses ts-node to transpile TypeScript to JavaScript. If the resolved tsconfig.json has module configured as ES formats. You might get errors like SyntaxError: Unexpected token. This is due that in Node ES module formats are not supported. To overcome this issue you need to configure ts-node to use commonjs module format.

http://karma-runner.github.io/5.0/config/configuration-file.html

Now we have a situation where the library is built for production with the settings

"module": "es6",

but for the unit tests with Karma, this setting is used:

"module": "commonjs",

In short, the unit tests build (transpile) the JS code with different settings so it is unclear whether this could lead to bugs which cannot be detected. However, the E2E use the library with its productive build options.

Karma:

This reverts commit ddc0e20.
@tobiasschweizer

This comment has been minimized.

@tobiasschweizer tobiasschweizer changed the title Update test framework to Angular 10 Update test framework to Angular 10 (DSP-789) Oct 7, 2020
@kilchenmann kilchenmann changed the base branch from master to main October 28, 2020 14:35
Copy link
Contributor

@subotic subotic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@tobiasschweizer tobiasschweizer merged commit 656f745 into main Mar 15, 2021
@tobiasschweizer tobiasschweizer deleted the wip/update-test-framework branch March 15, 2021 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants