From aa69e214f604d895abc0cb88675f9b907b2f83a6 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Wed, 2 Aug 2023 12:37:30 -0300 Subject: content, test: generatePreviousNextLinks: disable ID, fix null slots * New slot to disable id attribute, so component is more versatile * Fixes including false in return array for null previous/next slots --- .../snapshot/generatePreviousNextLinks.js.test.cjs | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 tap-snapshots/test/snapshot/generatePreviousNextLinks.js.test.cjs (limited to 'tap-snapshots') diff --git a/tap-snapshots/test/snapshot/generatePreviousNextLinks.js.test.cjs b/tap-snapshots/test/snapshot/generatePreviousNextLinks.js.test.cjs new file mode 100644 index 00000000..07268581 --- /dev/null +++ b/tap-snapshots/test/snapshot/generatePreviousNextLinks.js.test.cjs @@ -0,0 +1,28 @@ +/* IMPORTANT + * This snapshot file is auto-generated, but designed for humans. + * It should be checked into source control and tracked carefully. + * Re-generate by setting TAP_SNAPSHOT=1 and running tests. + * Make sure to inspect the output below. Do not ignore changes! + */ +'use strict' +exports[`test/snapshot/generatePreviousNextLinks.js TAP generatePreviousNextLinks (snapshot) > basic behavior 1`] = ` +previous: {"tooltip":true,"color":false,"attributes":{"id":"previous-button"},"content":"Previous"} +next: {"tooltip":true,"color":false,"attributes":{"id":"next-button"},"content":"Next"} +` + +exports[`test/snapshot/generatePreviousNextLinks.js TAP generatePreviousNextLinks (snapshot) > disable id 1`] = ` +previous: {"tooltip":true,"color":false,"attributes":{"id":false},"content":"Previous"} +next: {"tooltip":true,"color":false,"attributes":{"id":false},"content":"Next"} +` + +exports[`test/snapshot/generatePreviousNextLinks.js TAP generatePreviousNextLinks (snapshot) > neither link present 1`] = ` + +` + +exports[`test/snapshot/generatePreviousNextLinks.js TAP generatePreviousNextLinks (snapshot) > next missing 1`] = ` +previous: {"tooltip":true,"color":false,"attributes":{"id":"previous-button"},"content":"Previous"} +` + +exports[`test/snapshot/generatePreviousNextLinks.js TAP generatePreviousNextLinks (snapshot) > previous missing 1`] = ` +next: {"tooltip":true,"color":false,"attributes":{"id":"next-button"},"content":"Next"} +` -- cgit 1.3.0-6-gf8a5