forked from b00tc4mp/isdi-parttime-202406
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
carlos
committed
Sep 12, 2024
1 parent
ea22ad0
commit abd2b07
Showing
6 changed files
with
53 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
|
||
|
||
const ChainCharacters = require("./"); | ||
|
||
const aString = "My favorite color is blue"; | ||
const oldWord = "blue"; | ||
const newWord = "red"; | ||
|
||
const stringB = "Cual es el mejor bootcamp"; | ||
const pregunta = "Cual"; | ||
const respuesta = "ISDI"; | ||
|
||
const result1 = new ChainCharacters(aString).replace(oldWord, newWord); | ||
console.assert(result1.value === aString.replace(oldWord, newWord),{ | ||
result: result1, | ||
message: "Test 1 No pasado ", | ||
}); | ||
|
||
const result2 = new ChainCharacters(stringB).replace(pregunta, respuesta); | ||
console.assert(result2.value === stringB.replace(pregunta, respuesta),{ | ||
result: result2, | ||
message: "Test 1 No pasado ", | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
|
||
const ChainCharacters = require("./"); | ||
|
||
const string1 = "Madrid es la mejor ciudad del mundo." | ||
|
||
const result1 = new ChainCharacters(string1).slice(1, 3 ); | ||
console.assert(result1.value === string1.slice(1, 3),{ | ||
result: result1, | ||
message: "Test 1 No pasado ", | ||
}); |