-
-
Notifications
You must be signed in to change notification settings - Fork 518
Closed
Labels
Description
Hi there, thanks for maintaining and continuously improving ember-learn and ember guides. I am wondering if the below example is complete.
import { module, test } from 'qunit';
module('relativeDate', function(hooks) {
test('format relative dates correctly', function(assert) {
assert.equal(relativeDate('2018/01/28 22:24:30'), 'just now');
assert.equal(relativeDate('2018/01/28 22:23:30'), '1 minute ago');
assert.equal(relativeDate('2018/01/28 21:23:30'), '1 hour ago');
assert.equal(relativeDate('2018/01/27 22:23:30'), 'Yesterday');
assert.equal(relativeDate('2018/01/26 22:23:30'), '2 days ago');
});
});
I cannot figure out how relativeDate function available in the above test code.
Should it have been statically imported or looked up from the container?
Something like:
import { relativeDate } from '<app-context>/utils/date-utils';Best!