From 65121a90acb66dab0afcb02d425120b07c05429b Mon Sep 17 00:00:00 2001 From: Brett <27568879+BrettCleary@users.noreply.github.com> Date: Wed, 1 May 2024 19:53:14 -0700 Subject: [PATCH] add simple zip unit test --- test/mock_data/zipTest/testFile.txt | 1 + test/zip.test.ts | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 test/mock_data/zipTest/testFile.txt create mode 100644 test/zip.test.ts diff --git a/test/mock_data/zipTest/testFile.txt b/test/mock_data/zipTest/testFile.txt new file mode 100644 index 0000000..c8402aa --- /dev/null +++ b/test/mock_data/zipTest/testFile.txt @@ -0,0 +1 @@ +asdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqerasdsfadfasdfadzxvzcxvasdfwqer \ No newline at end of file diff --git a/test/zip.test.ts b/test/zip.test.ts new file mode 100644 index 0000000..bdeaf01 --- /dev/null +++ b/test/zip.test.ts @@ -0,0 +1,13 @@ +import { statSync } from 'fs' +import { zipDirectory } from '../src/zip' +import { expect } from 'chai' + +describe('Zip Directory', ()=>{ + it('should zip ironworkss', async ()=>{ + const statsBefore = statSync('./test/mock_data/zipTest/testFile.txt') + const outFile = './dist/testFile.zip' + await zipDirectory('./test/mock_data/zipTest', outFile) + const stats = statSync(outFile) + expect(stats.size).to.be.lessThan(statsBefore.size) + }) +}) \ No newline at end of file