Skip to content

Commit

Permalink
test the length of the mock classification
Browse files Browse the repository at this point in the history
  • Loading branch information
eatyourgreens committed Nov 7, 2024
1 parent 616ece1 commit c46b663
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/lib-classifier/src/store/ClassificationStore.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,13 @@ describe('Model > ClassificationStore', function () {
const finishedAt = submittedClassification.metadata.finished_at
expect(finishedAt).to.equal('2024-11-06T14:00:30.000Z')
})

it('should only record time spent classifying', function () {
const startedAt = submittedClassification.metadata.started_at
const finishedAt = submittedClassification.metadata.finished_at
const timeSpent = (new Date(finishedAt) - new Date(startedAt)) / 1000
expect(timeSpent).to.equal(30)
})
})

describe('with invalid feedback', function () {
Expand Down

0 comments on commit c46b663

Please sign in to comment.