diff --git a/scripts/__mocks__/@pdfme/generator.test.ts b/scripts/__mocks__/@pdfme/generator.test.ts new file mode 100644 index 0000000000..08be88bbaa --- /dev/null +++ b/scripts/__mocks__/@pdfme/generator.test.ts @@ -0,0 +1,18 @@ +import { generate } from './generator'; + +describe('Testing mock generate util', () => { + test('should return a Promise', async () => { + const result = generate(); + expect(result).toBeInstanceOf(Promise); + }); + + test('should resolve to a Uint8Array', async () => { + const result = await generate(); + expect(result).toBeInstanceOf(Uint8Array); + }); + + test('should resolve to a Uint8Array with correct values', async () => { + const result = await generate(); + expect(result).toEqual(new Uint8Array([10, 20, 30, 40, 50])); + }); +});