import { A as emberA } from '@ember/array';
import groupBy from 'dummy/utils/group-by';
import { module, test } from 'qunit';

module('Unit | Utility | group by');

test('It returns an empty object if array is empty', function (assert) {
  let group = groupBy(emberA(), '');
  assert.equal(typeof group, 'object');
});


test('It returns a promise proxy', function (assert) {
  let group = groupBy(emberA(), '');
  return group.then(function () {
    assert.ok(group.get('isFulfilled'));
  });
});

import groupBy from 'dummy/utils/group-by';
import { module, setupTest, test } from 'qunit';

module('Unit | Utility | group by', function (hooks) {
  setupTest(hooks);

  test('It returns an empty object if array is empty', function (assert) {
    const group = groupBy([], '');
    assert.equal(typeof group, 'object');
  });

  test('It returns a promise proxy', async function (assert) {
    const group = groupBy([], '');
    const proxy = await group;
    assert.ok(proxy.get('isFulfilled'));
  });
});

Add setup hooks and use async/await
Add setup hooks and use async/await
