diff --git a/jest.config.js b/jest.config.js index 4346984c74..4a4ee1c7c8 100644 --- a/jest.config.js +++ b/jest.config.js @@ -28,7 +28,8 @@ export default { '^@dicebear/collection$': '/scripts/__mocks__/@dicebear/collection.ts', '\\.svg\\?react$': '/scripts/__mocks__/fileMock.js', - '\\.svg$': '/scripts/__mocks__/fileMock.js', + '\\.svg$': '/scripts/__mocks__/fileMock.js', + "^@pdfme/generator$": "/scripts/__mocks__/@pdfme/generator.ts" }, moduleFileExtensions: [ 'web.js', diff --git a/package-lock.json b/package-lock.json index 806019c1c0..985f41441c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,7 @@ "@mui/x-charts": "^7.17.0", "@mui/x-data-grid": "^7.16.0", "@mui/x-date-pickers": "^7.11.1", - "@pdfme/generator": "^4.5.2", + "@pdfme/generator": "^5.0.0", "@reduxjs/toolkit": "^2.2.7", "@vitejs/plugin-react": "^4.3.1", "babel-plugin-transform-import-meta": "^2.2.1", @@ -4274,9 +4274,9 @@ } }, "node_modules/@pdfme/generator": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/@pdfme/generator/-/generator-4.5.2.tgz", - "integrity": "sha512-lwvNnknTjAlmThkdxNJLcr/1/gYUW1H6xvtdX7t1OSQ/oEJfgcR9oFsUsR+OTnEYDN4zXkAmQbm1K/tnjNQWVA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@pdfme/generator/-/generator-5.0.0.tgz", + "integrity": "sha512-Pb3HrjfPxqVcPAI2RpBx9NlthftoDqbE/5fwfMIrnx6ihNopazvYq0k4R4cEj/NIe38uJkwkXxpJeIlMS0vGcg==", "dependencies": { "@pdfme/pdf-lib": "^1.18.3", "atob": "^2.1.2", @@ -21731,9 +21731,9 @@ } }, "@pdfme/generator": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/@pdfme/generator/-/generator-4.5.2.tgz", - "integrity": "sha512-lwvNnknTjAlmThkdxNJLcr/1/gYUW1H6xvtdX7t1OSQ/oEJfgcR9oFsUsR+OTnEYDN4zXkAmQbm1K/tnjNQWVA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@pdfme/generator/-/generator-5.0.0.tgz", + "integrity": "sha512-Pb3HrjfPxqVcPAI2RpBx9NlthftoDqbE/5fwfMIrnx6ihNopazvYq0k4R4cEj/NIe38uJkwkXxpJeIlMS0vGcg==", "requires": { "@pdfme/pdf-lib": "^1.18.3", "atob": "^2.1.2", diff --git a/package.json b/package.json index 5619390f62..a83bfb0c42 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "@mui/x-charts": "^7.17.0", "@mui/x-data-grid": "^7.16.0", "@mui/x-date-pickers": "^7.11.1", - "@pdfme/generator": "^4.5.2", + "@pdfme/generator": "^5.0.0", "@reduxjs/toolkit": "^2.2.7", "@vitejs/plugin-react": "^4.3.1", "babel-plugin-transform-import-meta": "^2.2.1", diff --git a/scripts/__mocks__/@pdfme/generator.ts b/scripts/__mocks__/@pdfme/generator.ts new file mode 100644 index 0000000000..305b3c33c6 --- /dev/null +++ b/scripts/__mocks__/@pdfme/generator.ts @@ -0,0 +1,3 @@ +export const generate = async (): Promise => { + return new Uint8Array([10, 20, 30, 40, 50]); +}; \ No newline at end of file