Files
klz-cables.com/.pnpm-store/v10/files/4a/dd792285bb52176618ee23c771db75e4a17f48d63682a0cb5976a23011366134de1bbe3ddb57c71fd84ead2304673453bba53191fb1f0afd062207b5086eab
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

21 lines
664 B
Plaintext

'use strict'
const { test } = require('node:test')
const createDate = require('./create-date')
const wanted = 1624450038567
test('accepts arguments the Date constructor would accept', t => {
t.plan(2)
t.assert.strictEqual(createDate(1624450038567).getTime(), wanted)
t.assert.strictEqual(createDate('2021-06-23T12:07:18.567Z').getTime(), wanted)
})
test('accepts epoch as a string', t => {
// If Date() accepts this argument, the createDate function is not needed
// and can be replaced with Date()
t.plan(2)
t.assert.notEqual(new Date('16244500385-67').getTime(), wanted)
t.assert.strictEqual(createDate('1624450038567').getTime(), wanted)
})