Add some very basic tests
This commit is contained in:
parent
5dc7f541bd
commit
2892f4159f
37
tests/operations/tests/RenderPDF.mjs
Normal file
37
tests/operations/tests/RenderPDF.mjs
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
/**
|
||||||
|
* RenderPDF tests.
|
||||||
|
*
|
||||||
|
* @copyright Crown Copyright 2026
|
||||||
|
* @license Apache-2.0
|
||||||
|
*/
|
||||||
|
import TestRegister from "../../lib/TestRegister.mjs";
|
||||||
|
|
||||||
|
|
||||||
|
TestRegister.addTests([
|
||||||
|
{
|
||||||
|
name: "RenderPDF",
|
||||||
|
input: "Not a PDF",
|
||||||
|
expectedOutput: "Input does not appear to be a PDF file.",
|
||||||
|
recipeConfig: [
|
||||||
|
{
|
||||||
|
op: "Render PDF",
|
||||||
|
args: ["Raw"]
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "RenderPDF",
|
||||||
|
input: "",
|
||||||
|
expectedMatch: /^<iframe src="data:application\/pdf;base64,JVBERi0xLjAKCjEgMCBvYmogPDwg/,
|
||||||
|
recipeConfig: [
|
||||||
|
{
|
||||||
|
"op": "Generate QR Code",
|
||||||
|
"args": ["PDF", 1, 1, "Low"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "Render PDF",
|
||||||
|
"args": ["Raw"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
},
|
||||||
|
]);
|
||||||
Loading…
x
Reference in New Issue
Block a user