Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f4b8b16 commit 040c789Copy full SHA for 040c789
test/index.test.ts
@@ -115,8 +115,12 @@ describe('isValidPDF', () => {
115
116
117
describe('compressPDF', () => {
118
- test('returns PDF reduce size', async () => {
+ test('returns PDF reduce size send buffer file', async () => {
119
const optimizedPDF = await gs.compressPDF(files['pdf3.pdf'])
120
expect(optimizedPDF.length).toBeLessThanOrEqual(files['pdf3.pdf'].length);
121
});
122
+ test('returns PDF reduce size send string encoded file', async () => {
123
+ const optimizedPDF = await gs.compressPDF(files['pdf3.pdf'].toString('base64'))
124
+ expect(optimizedPDF.length).toBeLessThanOrEqual(files['pdf3.pdf'].length);
125
+ });
126
})
0 commit comments