2023-01-21 09:53:41 -08:00
|
|
|
const reverseString = require("./reverseString");
|
2022-02-20 11:07:44 -08:00
|
|
|
|
2023-01-21 09:53:41 -08:00
|
|
|
describe("reverseString", () => {
|
|
|
|
test("reverses single word", () => {
|
|
|
|
expect(reverseString("hello")).toEqual("olleh");
|
|
|
|
});
|
2022-02-20 11:07:44 -08:00
|
|
|
|
2023-01-21 09:53:41 -08:00
|
|
|
test.skip("reverses multiple words", () => {
|
|
|
|
expect(reverseString("hello there")).toEqual("ereht olleh");
|
|
|
|
});
|
2022-02-20 11:07:44 -08:00
|
|
|
|
2023-01-21 09:53:41 -08:00
|
|
|
test.skip("works with numbers and punctuation", () => {
|
|
|
|
expect(reverseString("123! abc!")).toEqual("!cba !321");
|
|
|
|
});
|
|
|
|
test.skip("works with blank strings", () => {
|
|
|
|
expect(reverseString("")).toEqual("");
|
|
|
|
});
|
2022-02-20 11:07:44 -08:00
|
|
|
});
|