import moduleForComponent from 'web-client/tests/helpers/module-for-component';
import { atOffset } from 'web-client/helpers/at-offset';
import { test } from 'qunit';

moduleForComponent('helpers/at-offset', 'Unit | Helper | helpers/at-offset');

test('it adds n to a number', function (assert) {
  assert.equal(atOffset([1, 1]), 2);
  assert.equal(atOffset([2, 5]), 7);
  assert.equal(atOffset([3, 0]), 3);
});

test('it adds n to a string converted to a number', function (assert) {
  assert.equal(atOffset(['1', '1']), 2);
});
