Skip to content

Commit 76e0097

Browse files
committed
fix: tests
1 parent a58449d commit 76e0097

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

test/fixtures/post-deploy/bella-tank.html

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
<meta name="externalId" content="5068">
2323
<meta name="addToCartAllowed" content="true">
2424
<meta name="inStock" content="true">
25-
<meta name="lastModifiedAtCS" content="2024-12-16T06:25:43.024Z">
2625
<meta property="product:availability" content="In stock">
2726
<meta property="product:price.amount" content="29">
2827
<meta property="product:price.currency" content="USD">

test/templates/html/index.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ describe('Render Product HTML', () => {
467467
assert.strictEqual(ogImage.getAttribute('content'), '/media/catalog/product/t/s/test-sku.png');
468468
});
469469

470-
it('should allow for undefined lastModifiedAt', () => {
470+
it('lastModifiedAtCS is not present if lastModifiedAt is undefined', () => {
471471
product.lastModifiedAt = undefined;
472472

473473
const html = htmlTemplateFromContext(DEFAULT_CONTEXT({ config }), product, variations).render();
@@ -476,6 +476,6 @@ describe('Render Product HTML', () => {
476476
document = dom.window.document;
477477

478478
const metaProductLastModified = document.querySelector('meta[name="lastModifiedAtCS"]');
479-
assert.strictEqual(metaProductLastModified.getAttribute('content'), 'undefined', 'meta[name="lastModifiedAtCS"] should be undefined');
479+
assert(!metaProductLastModified, 'meta[name="lastModifiedAtCS"] should not be in the document');
480480
});
481481
});

0 commit comments

Comments
 (0)