mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-22 22:28:08 +00:00
feat(Utils): add tests for getExtension
This commit is contained in:
parent
4dd1fd2dd5
commit
dec3dfa3cf
1 changed files with 15 additions and 0 deletions
|
|
@ -181,6 +181,21 @@ TestCase {
|
|||
|
||||
// -----------------------------------------------------------------
|
||||
|
||||
function test_getExtension_data () {
|
||||
return [
|
||||
{ input: 'foobar.baz', output: 'baz' },
|
||||
{ input: 'classe.george.abitbol', output: 'abitbol' },
|
||||
{ input: '', output: '' },
|
||||
{ input: 'cotcotcot', output: '' }
|
||||
]
|
||||
}
|
||||
|
||||
function test_getExtension (data) {
|
||||
compare(Utils.getExtension(data.input), data.output)
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------
|
||||
|
||||
function test_includes_data () {
|
||||
return [
|
||||
// Test arrays.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue