<commit_before>describe('Core_updateSettings', function () {
  var id = 'testContainer';

  beforeEach(function () {
    this.$container = $('<div id="' + id + '"></div>').appendTo('body');
  });

  afterEach(function () {
    if (this.$container) {
      destroy();
      this.$container.remove();
    }
  });

  it('should inherit cell type', function () {

    handsontable({
      data : [[1,2]],
      columns : [
        { },
        { type : 'checkbox' }
      ],
      cells : function (row, col, prop) {
        if (row === 0 && col === 0) {
          return {
            type : 'numeric'
          }
        }
      }
    });

    expect(getCellMeta(0, 0).type).toEqual('numeric');
    expect(getCellMeta(0, 1).type).toEqual('checkbox');

  });

  it('should not reset columns types to text', function () {
    handsontable({
      data : [[1, true]],
      columns : [
        { type : 'numeric' },
        { type : 'checkbox' }
      ]
    });

    var td = this.$container.find('td');

    expect(td.eq(0).text()).toEqual('1');
    expect(td.eq(1).text()).toEqual('');

    updateSettings({});

    expect(td.eq(0).text()).toEqual('1');
    expect(td.eq(1).text()).toEqual('');

  });


});<commit_msg>Test for #824 bug<commit_after>describe('Core_updateSettings', function () {
  var id = 'testContainer';

  beforeEach(function () {
    this.$container = $('<div id="' + id + '"></div>').appendTo('body');
  });

  afterEach(function () {
    if (this.$container) {
      destroy();
      this.$container.remove();
    }
  });

  it('should inherit cell type', function () {

    handsontable({
      data : [[1,2]],
      columns : [
        { },
        { type : 'checkbox' }
      ],
      cells : function (row, col, prop) {
        if (row === 0 && col === 0) {
          return {
            type : 'numeric'
          }
        }
      }
    });

    expect(getCellMeta(0, 0).type).toEqual('numeric');
    expect(getCellMeta(0, 1).type).toEqual('checkbox');

  });

  it('should not reset columns types to text', function () {
    handsontable({
      data : [[1, true]],
      columns : [
        { type : 'numeric' },
        { type : 'checkbox' }
      ]
    });

    var td = this.$container.find('td');

    expect(td.eq(0).text()).toEqual('1');
    expect(td.eq(1).text()).toEqual('');

    updateSettings({});

    expect(td.eq(0).text()).toEqual('1');
    expect(td.eq(1).text()).toEqual('');

  });

  it('should update readOnly global setting', function(){
    handsontable({
      readOnly: true,
      data : [['foo', true]],
      columns : [
        { type : 'text' },
        { type : 'checkbox' }
      ]
    });

    expect(getCellMeta(0, 0).readOnly).toBe(true);
    expect(getCellMeta(0, 1).readOnly).toBe(true);

    updateSettings({
      readOnly: false
    });

    expect(getCellMeta(0, 0).readOnly).toBe(false);
    expect(getCellMeta(0, 1).readOnly).toBe(false);
  });

  it('should update readOnly columns setting', function(){
    handsontable({
      data : [['foo', true]],
      columns : [
        { type : 'text',
          readOnly: true
        },
        { type : 'checkbox' }
      ]
    });

    expect(getCellMeta(0, 0).readOnly).toBe(true);
    expect(getCellMeta(0, 1).readOnly).toBe(false);

    updateSettings({
      columns: [
        { type : 'text',
          readOnly: false
        },
        { type : 'checkbox' }
      ]
    });

    expect(getCellMeta(0, 0).readOnly).toBe(false);
    expect(getCellMeta(0, 1).readOnly).toBe(false);
  });


});
{'fraction_non_alphanumeric': 0.20119352088661552, 'fraction_numerical': 0.013924410343847685, 'mean_word_length': 2.2146118721461185, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '654571', 'n_tokens_mistral': 1164, 'n_tokens_neox': 1120, 'n_words': 202}