Skip to content

Commit c2d7be9

Browse files
committed
Updated test cases to detect a bug.
When no format is specified in template then template should be returned. Current code returns empty string
1 parent 11fbf93 commit c2d7be9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/tests.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ describe('String.IsNullOrWhitespace', () => {
3232

3333
describe('String.Format Number Pattern', () => {
3434
describe('Placeholders', () => {
35+
it('should return template if no format is found', () => {
36+
let template = "Bar";
37+
let valueToInsert = "Foo";
38+
let result = String.Format(template, valueToInsert);
39+
expect(result).to.equal(template);
40+
});
41+
3542
it('should format the string correct', () => {
3643
let template = "{0}";
3744
let valueToInsert = "Foo";

0 commit comments

Comments
 (0)