<commit_before>import Disposable from '../../../../src/ol/Disposable.js';
import Map from '../../../../src/ol/Map.js';
import View from '../../../../src/ol/View.js';
import Polygon from '../../../../src/ol/geom/Polygon.js';
import RenderBox from '../../../../src/ol/render/Box.js';


describe('ol.render.Box', function() {

  let box, map, target;

  beforeEach(function() {
    box = new RenderBox('test-box');

    target = document.createElement('div');
    document.body.appendChild(target);

    map = new Map({
      target: target,
      view: new View({
        center: [0, 0],
        zoom: 0
      })
    });
    map.renderSync();
    box.setMap(map);
  });

  afterEach(function() {
    map.dispose();
    document.body.removeChild(target);
  });

  describe('constructor', function() {
    it('creates an instance', function() {
      const obj = new RenderBox('test-box');
      expect(obj).to.be.a(RenderBox);
      expect(obj).to.be.a(Disposable);
      obj.dispose();
    });
    it('creates an absolutely positioned DIV with a className', function() {<commit_msg>Give the map some height for the box tests<commit_after>import Disposable from '../../../../src/ol/Disposable.js';
import Map from '../../../../src/ol/Map.js';
import View from '../../../../src/ol/View.js';
import Polygon from '../../../../src/ol/geom/Polygon.js';
import RenderBox from '../../../../src/ol/render/Box.js';


describe('ol.render.Box', function() {

  let box, map, target;

  beforeEach(function() {
    box = new RenderBox('test-box');

    target = document.createElement('div');
    target.style.height = '256px';

    document.body.appendChild(target);

    map = new Map({
      target: target,
      view: new View({
        center: [0, 0],
        zoom: 0
      })
    });
    map.renderSync();
    box.setMap(map);
  });

  afterEach(function() {
    map.dispose();
    document.body.removeChild(target);
  });

  describe('constructor', function() {
    it('creates an instance', function() {
      const obj = new RenderBox('test-box');
      expect(obj).to.be.a(RenderBox);
      expect(obj).to.be.a(Disposable);
      obj.dispose();
    });
    it('creates an absolutely positioned DIV with a className', function() {
{'fraction_non_alphanumeric': 0.20674157303370785, 'fraction_numerical': 0.004044943820224719, 'mean_word_length': 2.4945054945054945, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3844933', 'n_tokens_mistral': 709, 'n_tokens_neox': 692, 'n_words': 156}