rangement/main.test.js

11 lines
410 B
JavaScript
Raw Normal View History

2023-07-05 22:34:32 +02:00
import finder from "./finder.mjs";
2023-07-01 12:35:33 +02:00
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', () => {
2023-07-05 22:34:32 +02:00
expect(finder.findFileExtension('2023-06-23T18.36.47 -- machin bidule.jpg')).toBe('.jpg');
2023-07-01 12:35:33 +02:00
});
2023-07-05 22:34:32 +02:00
})