« get me outta code hell

test: update image (snapshot) - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-04-24 16:12:42 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-05-01 07:06:07 -0300
commitd67db6a4d59ca9880a7ae5596c89550bd35c03c2 (patch)
treea47c157a7e7494f9f6cfd10cb8d4bfb8c0e56892
parent8ee8f07ecea69c245acab23d537eb35d39d7ef9d (diff)
test: update image (snapshot)
-rw-r--r--tap-snapshots/test/snapshot/image.js.test.cjs12
-rw-r--r--test/snapshot/image.js13
2 files changed, 18 insertions, 7 deletions
diff --git a/tap-snapshots/test/snapshot/image.js.test.cjs b/tap-snapshots/test/snapshot/image.js.test.cjs
index ddfb3e6c..77e95866 100644
--- a/tap-snapshots/test/snapshot/image.js.test.cjs
+++ b/tap-snapshots/test/snapshot/image.js.test.cjs
@@ -24,6 +24,14 @@ exports[`test/snapshot/image.js > TAP > image (snapshot) > content warnings via
 </div>
 `
 
+exports[`test/snapshot/image.js > TAP > image (snapshot) > dimensions 1`] = `
+<div class="image-container"><div class="image-outer-area"><div class="image-inner-area"><img class="image" width="400" src="foobar"></div></div></div>
+`
+
+exports[`test/snapshot/image.js > TAP > image (snapshot) > dimensions with square 1`] = `
+<div class="image-container"><div class="image-outer-area"><div class="image-inner-area"><img class="image" width="400" src="foobar"></div></div></div>
+`
+
 exports[`test/snapshot/image.js > TAP > image (snapshot) > lazy with square 1`] = `
 <noscript><div class="image-container square"><div class="image-outer-area square-content"><div class="image-inner-area"><img class="image" src="foobar"></div></div></div></noscript>
 <div class="image-container square js-hide"><div class="image-outer-area square-content"><div class="image-inner-area"><img class="image lazy" data-original="foobar"></div></div></div>
@@ -64,7 +72,3 @@ exports[`test/snapshot/image.js > TAP > image (snapshot) > thumb requested but s
 exports[`test/snapshot/image.js > TAP > image (snapshot) > thumbnail details 1`] = `
 <div class="image-container"><div class="image-outer-area"><div class="image-inner-area"><img class="image" data-original-length="1200" data-thumbs="voluminous:1200 middling:900 petite:20" src="thumb/album-art/beyond-canon/cover.voluminous.jpg"></div></div></div>
 `
-
-exports[`test/snapshot/image.js > TAP > image (snapshot) > width & height 1`] = `
-<div class="image-container"><div class="image-outer-area"><div class="image-inner-area"><img class="image" width="600" height="400" src="foobar"></div></div></div>
-`
diff --git a/test/snapshot/image.js b/test/snapshot/image.js
index 447e7fa7..1985211f 100644
--- a/test/snapshot/image.js
+++ b/test/snapshot/image.js
@@ -38,11 +38,10 @@ testContentFunctions(t, 'image (snapshot)', async (t, evaluate) => {
     },
   });
 
-  quickSnapshot('width & height', {
+  quickSnapshot('dimensions', {
     slots: {
       src: 'foobar',
-      width: 600,
-      height: 400,
+      dimensions: [600, 400],
     },
   });
 
@@ -53,6 +52,14 @@ testContentFunctions(t, 'image (snapshot)', async (t, evaluate) => {
     },
   });
 
+  quickSnapshot('dimensions with square', {
+    slots: {
+      src: 'foobar',
+      dimensions: [600, 400],
+      square: true,
+    },
+  });
+
   quickSnapshot('lazy with square', {
     slots: {
       src: 'foobar',