AzureAD / microsoft-authentication-library-for-js

Microsoft Authentication Library (MSAL) for JS
http://aka.ms/aadv2
MIT License
3.64k stars 2.65k forks source link

How to test the app.component.ts code in Angular 16? #6939

Closed Ospina2k closed 5 months ago

Ospina2k commented 7 months ago

Core Library

MSAL.js (@azure/msal-browser)

Wrapper Library

MSAL Angular (@azure/msal-angular)

Public or Confidential Client?

Public

Documentation Location

https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/samples/msal-angular-v3-samples/angular16-sample-app/src/app/app.component.ts

Description

Hello, the app.component.ts has a lot of code, but in the .spec.ts it does not have the test cases for that.

Ospina2k commented 7 months ago

image

This is my jest report

Ospina2k commented 7 months ago

up

sameerag commented 6 months ago

@jo-arroyo Can we address this?

Ospina2k commented 6 months ago

🥲

Ospina2k commented 6 months ago

up?

tnorling commented 5 months ago

You can't test these APIs in a headless environment without mocking them which is why those test files haven't been written. You can find our general E2E testing guidance here