Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "extractd", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "extract previews from DSLR and Mirrorless cameras RAW files", | ||
@@ -52,2 +52,2 @@ "main": "extractd.js", | ||
} | ||
} | ||
} |
@@ -21,2 +21,5 @@ const fs = require('fs'); | ||
`${samples}/sony_a7r_iii_01.arw`, | ||
`${samples}/panasonic_s1r_01.rw2`, | ||
`${samples}/pentax_k_1_mark_ii_01.dng`, | ||
`${samples}/fujifilm_x_t3_01.raf`, | ||
`${samples}/dummyFile.nef` | ||
@@ -33,3 +36,3 @@ ]; | ||
expect(done).to.have.lengthOf(4); | ||
expect(done).to.have.lengthOf(7); | ||
@@ -102,4 +105,55 @@ }); | ||
it('panasonic preview item in the array should contain objects with preview and source files', async () => { | ||
const item = done.filter(item => item.preview).filter(item => item.preview.includes('panasonic')).shift(); | ||
expect(item).to.have.own.property('preview'); | ||
expect(item).to.have.own.property('source'); | ||
expect(path.dirname(item.source)).to.be.deep.equal(path.dirname(item.preview)); | ||
expect(path.basename(item.source, path.extname(item.source))).to.be.deep.equal(path.basename(item.preview, '.jpg')); | ||
expect(path.extname(item.preview)).to.deep.equal('.jpg'); | ||
await del(item.preview); | ||
}); | ||
it('pentax preview item in the array should contain objects with preview and source files', async () => { | ||
const item = done.filter(item => item.preview).filter(item => item.preview.includes('pentax')).shift(); | ||
expect(item).to.have.own.property('preview'); | ||
expect(item).to.have.own.property('source'); | ||
expect(path.dirname(item.source)).to.be.deep.equal(path.dirname(item.preview)); | ||
expect(path.basename(item.source, path.extname(item.source))).to.be.deep.equal(path.basename(item.preview, '.jpg')); | ||
expect(path.extname(item.preview)).to.deep.equal('.jpg'); | ||
await del(item.preview); | ||
}); | ||
it('fujifilm preview item in the array should contain objects with preview and source files', async () => { | ||
const item = done.filter(item => item.preview).filter(item => item.preview.includes('fujifilm')).shift(); | ||
expect(item).to.have.own.property('preview'); | ||
expect(item).to.have.own.property('source'); | ||
expect(path.dirname(item.source)).to.be.deep.equal(path.dirname(item.preview)); | ||
expect(path.basename(item.source, path.extname(item.source))).to.be.deep.equal(path.basename(item.preview, '.jpg')); | ||
expect(path.extname(item.preview)).to.deep.equal('.jpg'); | ||
await del(item.preview); | ||
}); | ||
}); | ||
}); |
@@ -21,2 +21,5 @@ const fs = require('fs'); | ||
`${samples}/sony_a7r_iii_01.arw`, | ||
`${samples}/panasonic_s1r_01.rw2`, | ||
`${samples}/pentax_k_1_mark_ii_01.dng`, | ||
`${samples}/fujifilm_x_t3_01.raf`, | ||
`${samples}/dummyFile.nef` | ||
@@ -35,3 +38,3 @@ ]; | ||
expect(done).to.have.lengthOf(3); | ||
expect(done).to.have.lengthOf(6); | ||
@@ -86,4 +89,40 @@ }); | ||
it('panasonic preview should be returned in array', async () => { | ||
const item = done.filter(item => item.includes('panasonic')).shift(); | ||
expect(item).to.be.a('string'); | ||
expect(path.extname(item)).to.deep.equal('.jpg'); | ||
await del(item); | ||
}); | ||
it('pentax preview should be returned in array', async () => { | ||
const item = done.filter(item => item.includes('pentax')).shift(); | ||
expect(item).to.be.a('string'); | ||
expect(path.extname(item)).to.deep.equal('.jpg'); | ||
await del(item); | ||
}); | ||
it('fujifilm preview should be returned in array', async () => { | ||
const item = done.filter(item => item.includes('fujifilm')).shift(); | ||
expect(item).to.be.a('string'); | ||
expect(path.extname(item)).to.deep.equal('.jpg'); | ||
await del(item); | ||
}); | ||
}); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22897
377