This repository was archived by the owner on Dec 14, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 1- import { Moment } from 'moment' ;
1+ import { Duration } from 'moment' ;
22import UserSiteActivityAction from '../actionUtils/UserSiteActivityAction' ;
33import { site , source } from '../statementConstants/activityTypes' ;
44import createActivity from '../statementUtils/createActivity' ;
@@ -18,8 +18,8 @@ export interface SiteActivityAction extends UserSiteActivityAction {
1818 /** Determines if the activity was passed or failed. */
1919 readonly passed ?: boolean ;
2020
21- /** Determines how long the activity took as an ISO Duration . */
22- readonly duration ?: Moment . Duration ;
21+ /** Determines how long the activity took. */
22+ readonly duration ?: Duration ;
2323}
2424
2525/**
@@ -45,7 +45,9 @@ export default function actionOnSiteActivity(action: SiteActivityAction): Statem
4545 result : pickDefined ( {
4646 completion : action . completed ,
4747 success : action . passed ,
48- duration : action . duration ,
48+ duration : action . duration === undefined ? undefined : (
49+ action . duration . toISOString ( )
50+ ) ,
4951 } ) ,
5052 } ) ,
5153 context : {
You can’t perform that action at this time.
0 commit comments