Skip to content

Commit

Permalink
Add comment for activity tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sidharthachatterjee committed Oct 11, 2019
1 parent 15ef36a commit 4014e46
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions integration-tests/structured-logging/__tests__/logs.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const gatsbyBin = path.join(
`gatsby.js`
)

describe(`Activity`, () => {
describe(`Activities`, () => {
let gatsbyProcess
let events = []

Expand Down Expand Up @@ -46,7 +46,14 @@ describe(`Activity`, () => {

it.todo(`emits actions with a timestamp`)

it(`emits start, update and end for a successful activity`, async () => {
/* There are two typical lifecycles for activities. Most activities have
- Start
- Update (Optional)
- End
These tests assert whether events are correctly emitted for the complete lifecycle.
*/
it(`emit start, update and end events for a successful activity`, async () => {
const activityEvents = events.filter(
event =>
event.type === `LOG_ACTION` &&
Expand Down Expand Up @@ -94,7 +101,7 @@ describe(`Activity`, () => {
])
})

it(`emits start, update and end for a failed activity`, async () => {
it(`emit start, update and end events for a failed activity`, async () => {
const activityEvents = events.filter(
event =>
event.type === `LOG_ACTION` &&
Expand Down

0 comments on commit 4014e46

Please sign in to comment.