[AAE-12501] Fix Core unit tests that weren't executed because of the previous test.ts wrong location

This commit is contained in:
Amedeo Lepore
2023-03-31 12:12:03 +02:00
parent a4a07c7967
commit 3d1951bc23
2 changed files with 11 additions and 1 deletions
@@ -48,6 +48,7 @@ describe('AuthenticationInterceptor', () => {
});
it('should call add auth token method when SHOULD_ADD_AUTH_TOKEN context is set to true', () => {
addTokenToHeaderSpy.and.callThrough();
request.context.set(SHOULD_ADD_AUTH_TOKEN, true);
interceptor.intercept(request, mockNext);
expect(addTokenToHeaderSpy).toHaveBeenCalled();
@@ -26,6 +26,7 @@ import { CommonModule } from '@angular/common';
import { ShellAppService, SHELL_APP_SERVICE } from '../../services/shell-app.service';
import { HttpClientModule } from '@angular/common/http';
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { TranslateModule } from '@ngx-translate/core';
class MockRouter {
private url = 'some-url';
@@ -57,7 +58,15 @@ describe('AppLayoutComponent', () => {
};
TestBed.configureTestingModule({
imports: [CommonModule, NoopAnimationsModule, HttpClientModule, SidenavLayoutModule, ExtensionsModule, RouterModule.forChild([])],
imports: [
CommonModule,
NoopAnimationsModule,
HttpClientModule,
SidenavLayoutModule,
ExtensionsModule,
RouterModule.forChild([]),
TranslateModule.forRoot()
],
providers: [
{
provide: Router,