debut TP2
This commit is contained in:
19
src/exercises/convertToLowercase/index.test.ts
Normal file
19
src/exercises/convertToLowercase/index.test.ts
Normal file
@ -0,0 +1,19 @@
|
||||
import { convertToLowercase } from "./index";
|
||||
|
||||
describe("convertToLowercase", () => {
|
||||
it.each([
|
||||
{ input: "ToTO", expected: "toto" },
|
||||
{ input: "ToTo", expected: "toto" },
|
||||
{ input: "TOTo", expected: "toto" },
|
||||
])(
|
||||
"should return the input in lowercase when all letters are uppercases",
|
||||
({ input, expected }) => {
|
||||
// Arrange
|
||||
// Act
|
||||
const result = convertToLowercase(input);
|
||||
|
||||
// Assert
|
||||
expect(result).toStrictEqual(expected);
|
||||
}
|
||||
);
|
||||
});
|
Reference in New Issue
Block a user