Skip to content

Commit 2762b0a

Browse files
authored
test(module:carousel): remove invalid cases (#8860)
1 parent cc52555 commit 2762b0a

File tree

1 file changed

+1
-46
lines changed

1 file changed

+1
-46
lines changed

components/carousel/carousel.spec.ts

Lines changed: 1 addition & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { BidiModule, Dir, Direction, Directionality } from '@angular/cdk/bidi';
1+
import { Directionality } from '@angular/cdk/bidi';
22
import { ENTER, LEFT_ARROW, RIGHT_ARROW } from '@angular/cdk/keycodes';
33
import { Component, DebugElement, ViewChild } from '@angular/core';
44
import { ComponentFixture, discardPeriodicTasks, fakeAsync, TestBed, tick } from '@angular/core/testing';
@@ -476,20 +476,6 @@ export class NzTestCarouselBasicComponent {
476476
beforeChange = jasmine.createSpy('beforeChange callback');
477477
}
478478

479-
@Component({
480-
standalone: true,
481-
imports: [BidiModule, NzTestCarouselBasicComponent],
482-
template: `
483-
<div [dir]="direction">
484-
<nz-test-carousel></nz-test-carousel>
485-
</div>
486-
`
487-
})
488-
export class NzTestCarouselRtlComponent {
489-
@ViewChild(Dir) dir!: Dir;
490-
direction: Direction = 'rtl';
491-
}
492-
493479
@Component({
494480
standalone: true,
495481
imports: [NzCarouselModule],
@@ -531,7 +517,6 @@ describe('carousel', () => {
531517
});
532518

533519
TestBed.configureTestingModule({
534-
imports: [NzCarouselModule],
535520
providers: [
536521
{
537522
provide: Directionality,
@@ -592,34 +577,4 @@ describe('carousel', () => {
592577
tick(101);
593578
expect(component.layout).toHaveBeenCalled();
594579
}));
595-
596-
it('should set correct index as active in ltr mode', () => {
597-
component.dir = 'ltr';
598-
component.carouselContents = [
599-
{
600-
isActive: false
601-
},
602-
{
603-
isActive: false
604-
}
605-
] as NzSafeAny;
606-
component['markContentActive'](0);
607-
608-
expect((component.carouselContents as NzSafeAny)[0].isActive).toBeTruthy();
609-
});
610-
611-
it('should set correct index as active in rtl mode', () => {
612-
component.dir = 'rtl';
613-
component.carouselContents = [
614-
{
615-
isActive: false
616-
},
617-
{
618-
isActive: false
619-
}
620-
] as NzSafeAny;
621-
component['markContentActive'](0);
622-
623-
expect((component.carouselContents as NzSafeAny)[1].isActive).toBeTruthy();
624-
});
625580
});

0 commit comments

Comments
 (0)