uppy/packages/@uppy/webcam/src/formatSeconds.test.js
Dominic Eden e7fbaa940d [feature] - Add new ‘showRecordingLength’ option for the Webcam plugin (#1947)
* [feature] - Add new ‘showRecordingLength’ prop for the Webcam plugin. When this is true, it counts the duration of a recording and displays it to the user. Add a test for generating the correct duration of the recording.

* Update packages/@uppy/webcam/src/style.scss

Co-Authored-By: Artur Paikin <artur@arturpaikin.com>

* Added i18n for the recording length counter and update Readme. Fix Webcam styles where some styles were not in alphabetical order.

* Update packages/@uppy/webcam/src/style.scss

Co-Authored-By: Artur Paikin <artur@arturpaikin.com>

Added i18n for the recording length counter and update Readme. Fix Webcam styles where some styles were not in alphabetical order.
2019-11-27 20:10:38 +03:00

11 lines
378 B
JavaScript

const formatSeconds = require('./formatSeconds')
describe('formatSeconds', () => {
it('should return a value of \'0:43\' when an argument of 43 seconds is supplied', () => {
expect(formatSeconds(43)).toEqual('0:43')
})
it('should return a value of \'1:43\' when an argument of 103 seconds is supplied', () => {
expect(formatSeconds(103)).toEqual('1:43')
})
})