@@ -7,7 +7,7 @@ import { PRESENCE_RESPONSE, EVENT_PRESENCE } from '../../actionConstants';
7
7
import {
8
8
reducer as presenceReducer ,
9
9
getAggregatedPresence ,
10
- presenceToHumanTime ,
10
+ userLastActiveAsRelativeTimeString ,
11
11
statusFromPresence ,
12
12
statusFromPresenceAndUserStatus ,
13
13
} from '../presenceModel' ;
@@ -85,10 +85,10 @@ describe('getAggregatedPresence', () => {
85
85
} ) ;
86
86
} ) ;
87
87
88
- describe ( 'presenceToHumanTime ' , ( ) => {
89
- test ( 'given a presence return human readable time' , ( ) => {
88
+ describe ( 'userLastActiveAsRelativeTimeString ' , ( ) => {
89
+ test ( 'given a presence return a relative time' , ( ) => {
90
90
expect (
91
- presenceToHumanTime (
91
+ userLastActiveAsRelativeTimeString (
92
92
{
93
93
aggregated : { client : 'website' , status : 'active' , timestamp : currentTimestamp - 240 } ,
94
94
} ,
@@ -100,7 +100,7 @@ describe('presenceToHumanTime', () => {
100
100
101
101
test ( 'if less than a threshold, the user is currently active' , ( ) => {
102
102
expect (
103
- presenceToHumanTime (
103
+ userLastActiveAsRelativeTimeString (
104
104
{
105
105
aggregated : { client : 'website' , status : 'active' , timestamp : currentTimestamp - 100 } ,
106
106
} ,
@@ -113,7 +113,7 @@ describe('presenceToHumanTime', () => {
113
113
// TODO(server-6.0): Remove
114
114
test ( 'Pre-FL 148: if less than a day and user is "away", use imprecise "today"' , ( ) => {
115
115
expect (
116
- presenceToHumanTime (
116
+ userLastActiveAsRelativeTimeString (
117
117
{ aggregated : { client : 'website' , status : 'active' , timestamp : currentTimestamp - 100 } } ,
118
118
{ away : true , status_text : null , status_emoji : null } ,
119
119
147 ,
@@ -125,7 +125,7 @@ describe('presenceToHumanTime', () => {
125
125
// above after the status parameter is gone.
126
126
test ( 'FL 148: if less than a day and user is "away", *don\'t* use imprecise "today"' , ( ) => {
127
127
expect (
128
- presenceToHumanTime (
128
+ userLastActiveAsRelativeTimeString (
129
129
{ aggregated : { client : 'website' , status : 'active' , timestamp : currentTimestamp - 100 } } ,
130
130
{ away : true , status_text : null , status_emoji : null } ,
131
131
148 ,
0 commit comments