mirror of
https://github.com/10h30/odin-javascript-exercises.git
synced 2026-06-05 15:09:09 +09:00
@@ -1,24 +1,24 @@
|
||||
const snakeCase = require('./snakeCase')
|
||||
const snakeCase = require("./snakeCase");
|
||||
|
||||
describe("snakeCase", () => {
|
||||
it("works with simple lowercased phrases", () => {
|
||||
describe("snakeCase", function () {
|
||||
it("works with simple lowercased phrases", function () {
|
||||
expect(snakeCase("hello world")).toEqual("hello_world");
|
||||
});
|
||||
it("works with Caps and punctuation", () => {
|
||||
xit("works with Caps and punctuation", function () {
|
||||
expect(snakeCase("Hello, World???")).toEqual("hello_world");
|
||||
});
|
||||
it("works with longer phrases", () => {
|
||||
xit("works with longer phrases", function () {
|
||||
expect(snakeCase("This is the song that never ends....")).toEqual(
|
||||
"this_is_the_song_that_never_ends"
|
||||
);
|
||||
});
|
||||
it("works with camel case", () => {
|
||||
xit("works with camel case", function () {
|
||||
expect(snakeCase("snakeCase")).toEqual("snake_case");
|
||||
});
|
||||
it("works with kebab case", () => {
|
||||
xit("works with kebab case", function () {
|
||||
expect(snakeCase("snake-case")).toEqual("snake_case");
|
||||
});
|
||||
it("works with WTF case", () => {
|
||||
xit("works with WTF case", function () {
|
||||
expect(snakeCase("SnAkE..CaSe..Is..AwEsOmE")).toEqual(
|
||||
"snake_case_is_awesome"
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user