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

Karma test runner uses deprecated parameters to start Karma server #20479

Closed
1 of 15 tasks
erikhorlings opened this issue Apr 9, 2021 · 2 comments · Fixed by #20485
Closed
1 of 15 tasks

Karma test runner uses deprecated parameters to start Karma server #20479

erikhorlings opened this issue Apr 9, 2021 · 2 comments · Fixed by #20485

Comments

@erikhorlings
Copy link

🐞 Bug report

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • extract-i18n
  • run
  • config
  • help
  • version
  • doc

Is this a regression?

Not relevant, this is caused by a change in Karma.

Description

When running 'ng test' in a project that is set up to use Karma as test framework, a warning about deprecated functionality is given.

🔬 Minimal Reproduction

Running 'ng test' on an Angular project that uses Karma as test framework.

🔥 Exception or Error


Passing raw CLI options to `new Server(config, done)` is deprecated. Use `parseConfig(configFilePath, cliOptions, {promiseConfig: true, throwErrors: true})` to prepare a processed `Config` instance and pass that as the `config` argument instead.

🌍 Your Environment




Angular CLI: 11.2.7
Node: 14.13.1
OS: darwin x64

Angular: 11.2.8
... animations, common, compiler, compiler-cli, core, forms
... language-service, localize, platform-browser
... platform-browser-dynamic, router
Ivy Workspace: Yes

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1102.7
@angular-devkit/build-angular   0.1102.8
@angular-devkit/core            11.2.7
@angular-devkit/schematics      11.2.7
@angular/cdk                    11.2.7
@angular/cli                    11.2.7
@schematics/angular             11.2.7
@schematics/update              0.1102.7
rxjs                            6.6.7
typescript                      4.1.5

Anything else relevant?

@erikhorlings
Copy link
Author

I tried creating a pull request for this, but I think it depends on a change in the @karma/types library. I created an issue for that too: DefinitelyTyped/DefinitelyTyped#52282

clydin pushed a commit that referenced this issue Apr 9, 2021
…eprecated API

With this change we update the Karma builder to use the new Server API.

Closes: #20479
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators May 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.