41c46fa1447311de508a14878925c3efeca7a9b264b7fb0e1408375f73d19e44156c291efbd0d2a25363edc3a9a2e63d34154f8b8715e1c113f66434855575 640 B

123456789101112131415161718192021222324252627
  1. describe('Core.toVisualColumn', () => {
  2. var id = 'testContainer';
  3. beforeEach(function() {
  4. this.$container = $(`<div id="${id}"></div>`).appendTo('body');
  5. });
  6. afterEach(function() {
  7. if (this.$container) {
  8. destroy();
  9. this.$container.remove();
  10. }
  11. });
  12. it('should return valid visual row index', () => {
  13. var hot = handsontable({
  14. data: Handsontable.helper.createSpreadsheetData(10, 10),
  15. unmodifyCol(column) {
  16. return column + 3;
  17. }
  18. });
  19. expect(hot.toVisualColumn(0)).toBe(3);
  20. expect(hot.toVisualColumn(1)).toBe(4);
  21. expect(hot.toVisualColumn(2)).toBe(5);
  22. });
  23. });