2023-06-29 18:58:08 +02:00
|
|
|
import finder from "./finders.mjs";
|
2023-06-29 18:00:38 +02:00
|
|
|
// const finders = require('./finders.mjs')
|
2023-06-29 17:53:15 +02:00
|
|
|
|
|
|
|
describe('rangement file name', () => {
|
|
|
|
|
|
|
|
test('detects date in file name', () => {
|
2023-06-29 18:58:08 +02:00
|
|
|
expect(finder.findFormattedDate('2023-06-23T18.36.47 -- machin bidule.jpg')).toBe('2023-06-23T18.36.47');
|
2023-06-29 17:53:15 +02:00
|
|
|
});
|
2023-06-29 18:00:38 +02:00
|
|
|
test('detects file extension in file name', () => {
|
2023-06-29 18:58:08 +02:00
|
|
|
expect(finder.findFileExtension()('2023-06-23T18.36.47 -- machin bidule.jpg')).toBe('jpg');
|
2023-06-29 18:00:38 +02:00
|
|
|
});
|
2023-06-29 17:53:15 +02:00
|
|
|
})
|
2023-06-29 18:58:08 +02:00
|
|
|
console.log('finders', finder)
|
2023-06-29 17:40:48 +02:00
|
|
|
|
|
|
|
test('adding positive numbers is not zero', () => {
|
|
|
|
for (let a = 1; a < 10; a++) {
|
|
|
|
for (let b = 1; b < 10; b++) {
|
|
|
|
expect(a + b).not.toBe(0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|