rwwagner90/ember-math-helpers

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

Summary

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

module('Unit | Helper | trunc', function () {
  test('trunc works', function (assert) {
    let result;
    result = trunc([13.37]);
    assert.strictEqual(result, 13);
    result = trunc([0.123]);
    assert.strictEqual(result, 0);
    result = trunc([-1.123]);
    assert.strictEqual(result, -1);
  });
});