Skip to content

Commit

Permalink
chore(tests): fix resize service tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MarsiBarsi committed Oct 16, 2020
1 parent 657b448 commit a2d1de1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions projects/cdk/services/test/resize.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@ import {TuiDestroyService} from '../destroy.service';
import {TuiResizeService} from '../resize.service';

describe('TuiResizeService', () => {
let emitCounter: number;
let element: HTMLElement;

beforeEach(() => {
emitCounter = 0;

element = document.createElement('div');
element.style.width = '200px';
document.body.appendChild(element);
Expand All @@ -31,6 +28,7 @@ describe('TuiResizeService', () => {
});

it('emits default first value', done => {
let emitCounter = 0;
const resize$ = TestBed.get(TuiResizeService);

resize$.subscribe(() => {
Expand All @@ -44,6 +42,7 @@ describe('TuiResizeService', () => {
});

it('emits when element is resized', done => {
let emitCounter = 0;
const resize$ = TestBed.get(TuiResizeService);

resize$.subscribe(() => {
Expand Down

0 comments on commit a2d1de1

Please sign in to comment.