forked from binary-com/deriv-app
-
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.
fix: fixed the template utility tests
- Loading branch information
1 parent
9bd66e7
commit bb07c67
Showing
5 changed files
with
33 additions
and
31 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,15 @@ | ||
import { template } from '../utility'; | ||
|
||
describe('Utility', () => { | ||
describe('.template()', () => { | ||
it('works as expected', () => { | ||
expect(template('abc [_1] abc', ['2'])).toBe('abc 2 abc'); | ||
expect(template('[_1] [_2]', ['1', '2'])).toBe('1 2'); | ||
expect(template('[_1] [_1]', ['1'])).toBe('1 1'); | ||
}); | ||
|
||
it('does not replace twice', () => { | ||
expect(template('[_1] [_2]', ['[_2]', 'abc'])).toBe('[_2] abc'); | ||
}); | ||
}); | ||
}); |
5 changes: 3 additions & 2 deletions
5
packages/cfd/src/_common/base/server_time.js → packages/cfd/src/_common/base/server_time.ts
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