<commit_before>import { Component, ViewChild, ElementRef } from '@angular/core';
import { TestBed, ComponentFixture, fakeAsync, tick, ComponentFixtureAutoDetect } from '@angular/core/testing';
import { NbListModule } from './list.module';
import { NbListComponent } from './list.component';

function waitForSpyCall(spy: jasmine.Spy, checkInterval: number = 40, timeout: number = 500): Promise<any> {
  const initialCallsCount = spy.calls.count();

  return new Promise((resolve, reject) => {
    let intervalId;
    const timeoutId = setTimeout(() => {
      clearInterval(intervalId);
      reject();
    }, timeout);

    intervalId = setInterval(() => {
      if (spy.calls.count() > initialCallsCount) {
        clearTimeout(timeoutId);
        clearInterval(intervalId);
        resolve();
      }
    }, checkInterval);
  });
}

const ITEMS_PER_PAGE: number = 10;
const ITEM_HEIGHT: number = 100;
const LIST_HEIGHT: number = 500;<commit_msg>test(list pager): increase default spy wait time (#1926)<commit_after>import { Component, ViewChild, ElementRef } from '@angular/core';
import { TestBed, ComponentFixture, fakeAsync, tick, ComponentFixtureAutoDetect } from '@angular/core/testing';
import { NbListModule } from './list.module';
import { NbListComponent } from './list.component';

function waitForSpyCall(spy: jasmine.Spy, checkInterval: number = 40, timeout: number = 1000): Promise<any> {
  const initialCallsCount = spy.calls.count();

  return new Promise((resolve, reject) => {
    let intervalId;
    const timeoutId = setTimeout(() => {
      clearInterval(intervalId);
      reject();
    }, timeout);

    intervalId = setInterval(() => {
      if (spy.calls.count() > initialCallsCount) {
        clearTimeout(timeoutId);
        clearInterval(intervalId);
        resolve();
      }
    }, checkInterval);
  });
}

const ITEMS_PER_PAGE: number = 10;
const ITEM_HEIGHT: number = 100;
const LIST_HEIGHT: number = 500;
{'fraction_non_alphanumeric': 0.13402061855670103, 'fraction_numerical': 0.015979381443298968, 'mean_word_length': 4.028497409326425, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4229752', 'n_tokens_mistral': 611, 'n_tokens_neox': 572, 'n_words': 142}