<commit_before>import { MockHelper, TestingPlayerAPI } from '../helper/MockHelper';
import { UIContainer } from '../../src/ts/components/uicontainer';
import { UIInstanceManager } from '../../src/ts/uimanager';

let playerMock: TestingPlayerAPI;
let uiInstanceManagerMock: UIInstanceManager;

describe('UIContainer', () => {
  beforeEach(() => {
    playerMock = MockHelper.getPlayerMock();
    uiInstanceManagerMock = MockHelper.getUiInstanceManagerMock();
  });

  describe('release', () => {
    let uiContainer: UIContainer;
    beforeEach(() => {
      uiContainer = new UIContainer({
        hideDelay: -1, // With an hideDelay of -1 the uiHideTimeout and userInteractionEvents never will be initialized
        components: [],
      });
    });

    describe('with configured hide delay of -1', () => {
      it('works without calling configure', () => {
        // Ensure that we don't try to call something on undefined properties
        expect((uiContainer as any).uiHideTimeout).toBeUndefined();
        expect((uiContainer as any).userInteractionEvents).toBeUndefined();

        uiContainer.release();
      });

      it('works with calling configure', () => {
        uiContainer.configure(playerMock, uiInstanceManagerMock);

        uiContainer.release();
        // Ensure that we don't try to call something on undefined properties
        expect((uiContainer as any).uiHideTimeout).toBeUndefined();
        expect((uiContainer as any).userInteractionEvents).toBeUndefined();
      });
    });<commit_msg>remove unnecessary expectations<commit_after>import { MockHelper, TestingPlayerAPI } from '../helper/MockHelper';
import { UIContainer } from '../../src/ts/components/uicontainer';
import { UIInstanceManager } from '../../src/ts/uimanager';

let playerMock: TestingPlayerAPI;
let uiInstanceManagerMock: UIInstanceManager;

describe('UIContainer', () => {
  beforeEach(() => {
    playerMock = MockHelper.getPlayerMock();
    uiInstanceManagerMock = MockHelper.getUiInstanceManagerMock();
  });

  describe('release', () => {
    let uiContainer: UIContainer;
    beforeEach(() => {
      uiContainer = new UIContainer({
        hideDelay: -1, // With an hideDelay of -1 the uiHideTimeout and userInteractionEvents never will be initialized
        components: [],
      });
    });

    describe('with configured hide delay of -1', () => {
      /* no exception expected */
      it('works without calling configure', () => {
        uiContainer.release();
      });

      /* no exception expected */
      it('works with calling configure', () => {
        uiContainer.configure(playerMock, uiInstanceManagerMock);

        uiContainer.release();
      });
    });
{'fraction_non_alphanumeric': 0.13600891861761427, 'fraction_numerical': 0.002229654403567447, 'mean_word_length': 3.3141025641025643, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, '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': '7040731', 'n_tokens_mistral': 694, 'n_tokens_neox': 696, 'n_words': 176}