Skip to content
This repository was archived by the owner on Dec 14, 2020. It is now read-only.

Commit 91b52f4

Browse files
committed
feat(actionOnSiteActivity): Adds durations.
1 parent 6b9338c commit 91b52f4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/statementCreators/actionOnSiteActivity.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { Moment } from 'moment';
12
import UserSiteActivityAction from '../actionUtils/UserSiteActivityAction';
23
import { site, source } from '../statementConstants/activityTypes';
34
import createActivity from '../statementUtils/createActivity';
@@ -16,6 +17,9 @@ export interface SiteActivityAction extends UserSiteActivityAction {
1617

1718
/** Determines if the activity was passed or failed. */
1819
readonly passed?: boolean;
20+
21+
/** Determines how long the activity took as an ISO Duration. */
22+
readonly duration?: Moment.Duration;
1923
}
2024

2125
/**
@@ -41,6 +45,7 @@ export default function actionOnSiteActivity(action: SiteActivityAction): Statem
4145
result: pickDefined({
4246
completion: action.completed,
4347
success: action.passed,
48+
duration: action.duration,
4449
}),
4550
}),
4651
context: {

0 commit comments

Comments
 (0)