rwwagner90/ember-math-helpers

View on GitHub
test-app/tests/unit/helpers/ceil-test.js

Summary

Maintainability
A
0 mins
Test Coverage
import { ceil } from 'ember-math-helpers/helpers/ceil';
import { module, test } from 'qunit';

module('Unit | Helper | ceil', function () {
  test('it works', function (assert) {
    let result = ceil([1]);
    assert.strictEqual(result, 1);

    result = ceil([1.01]);
    assert.strictEqual(result, 2);

    result = ceil([1.5]);
    assert.strictEqual(result, 2);

    result = ceil([1.99]);
    assert.strictEqual(result, 2);

    result = ceil([2]);
    assert.strictEqual(result, 2);
  });
});