Files
klz-cables.com/.pnpm-store/v10/files/04/19c54690db249acc5d34fada2193d03d54c7dad00372cf6418926f490bf415413ff06949ab79e1c84f97cfe05297c2d56ae59ad81dffce1db2b5fe74f315ec
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

40 lines
678 B
Plaintext

var assert = require('assert')
var snake = require('..')
/**
* Cases.
*/
var strings = {
camel: 'thisIsAString',
constant: 'THIS_IS_A_STRING',
dot: 'this.is.a.string',
pascal: 'ThisIsAString',
sentence: 'This is a string.',
snake: 'this_is_a_string',
space: 'this is a string',
title: 'This Is a String',
junk: '-this__is$%a-string...'
}
/**
* Tests.
*/
describe('to-snake-case', function () {
for (var key in strings) test(key)
})
/**
* Create a test for a given case `key`.
*
* @param {String} key
*/
function test(key) {
it('should convert ' + key + ' case', function () {
assert.equal(snake(strings[key]), 'this_is_a_string')
})
}