- Consolidated duplicate UndoManagers to single instance - Fixed connection promise to only resolve on 'connected' status - Fixed WebSocketProvider import (WebsocketProvider) - Added proper doc.destroy() cleanup - Renamed isPresenceInitialized property to avoid conflict Co-Authored-By: Paperclip <noreply@paperclip.ing>
29 lines
889 B
JavaScript
29 lines
889 B
JavaScript
"use strict";
|
|
const { test } = require("zora");
|
|
const kebabCase = require("./");
|
|
|
|
test("string with uppercased letters", (t) => {
|
|
t.equal(kebabCase("helloWorld"), "hello-world");
|
|
t.equal(kebabCase("hello World!"), "hello -world!");
|
|
});
|
|
|
|
test("string without uppercased letters", (t) => {
|
|
t.equal(kebabCase("hello world"), "hello world");
|
|
t.equal(kebabCase("-- hello world --"), "-- hello world --");
|
|
});
|
|
|
|
test("string with leading uppercased letters", (t) => {
|
|
t.equal(kebabCase("WebkitTransform"), "-webkit-transform");
|
|
t.equal(kebabCase("Mr. Kebab"), "-mr. -kebab");
|
|
});
|
|
|
|
test("string with international uppercased letters", (t) => {
|
|
t.equal(kebabCase("ølÜberÅh"), "øl-über-åh");
|
|
t.equal(kebabCase("Érnest"), "-érnest");
|
|
});
|
|
|
|
test("the reverse", (t) => {
|
|
const str = "Hallå, Mr. Kebab Überstein! How you doin'?-";
|
|
t.equal(kebabCase.reverse(kebabCase(str)), str);
|
|
});
|