rangement/finder.test.js

17 lines
403 B
JavaScript

import finder from './finder.mjs'
describe('rangement file name', () => {
test('detects date in file name', () => {
expect(finder
.findFormattedDate('2023-06-23T18.36.47 -- machin bidule.jpg')
)
.toBe('2023-06-23T18.36.47')
})
test('detects file extension in file name', () => {
expect(finder
.findFileExtension('2023-06-23T18.36.47 -- machin bidule.jpg')
)
.toBe('.jpg')
})
})