Created
June 26, 2023 04:50
-
-
Save pmatsinopoulos/be330e696b3be185e0d8e4bbc547c6d4 to your computer and use it in GitHub Desktop.
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
describe('squeeze function', function () { | |
context('when string is "Hello World!" and set of characters is "oe"', function () { | |
var input = "Hello World!"; | |
var setOfCharacters = "oe"; | |
var result = "Hll Wrld!"; | |
it('should return "' + result + '"', function () { | |
expect(squeeze(input, setOfCharacters)).toBe(result); | |
}); | |
}); | |
context('when string is "Hello World!" and set of characters is "oE"', function () { | |
var input = "Hello World!"; | |
var setOfCharacters = "oE"; | |
var result = "Hll Wrld!"; | |
it('should return "' + result + '"', function () { | |
expect(squeeze(input, setOfCharacters)).toBe(result); | |
}); | |
}); | |
context('when string is "Hello World!" and set of characters is "fbzXYZ"', function () { | |
var input = "Hello World!"; | |
var setOfCharacters = "fbzXYZ"; | |
var result = input; | |
it('should return "' + result + '"', function () { | |
expect(squeeze(input, setOfCharacters)).toBe(result); | |
}); | |
}); | |
context('when string is empty and set of characters is "oE"', function () { | |
var input = ""; | |
var setOfCharacters = "oE"; | |
var result = ""; | |
it('should return "' + result + '"', function () { | |
expect(squeeze(input, setOfCharacters)).toBe(result); | |
}); | |
}); | |
context('when string is "Hello World!" and set of characters is ""', function () { | |
var input = "Hello World!"; | |
var setOfCharacters = ""; | |
var result = input; | |
it('should return "' + result + '"', function () { | |
expect(squeeze(input, setOfCharacters)).toBe(result); | |
}); | |
}); | |
context('when string is null and set of characters is "oE"', function () { | |
var input = null; | |
var setOfCharacters = "oE"; | |
var result = null; | |
it('should return "' + result + '"', function () { | |
expect(squeeze(input, setOfCharacters)).toBe(result); | |
}); | |
}); | |
context('when string is "Hello World!" and set of characters is null', function () { | |
var input = "Hello World!"; | |
var setOfCharacters = null; | |
var result = input; | |
it('should return "' + result + '"', function () { | |
expect(squeeze(input, setOfCharacters)).toBe(result); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment