feat(Utils): add tests for getExtension

This commit is contained in:
Ronan Abhamon 2016-11-10 13:37:55 +01:00
parent 4dd1fd2dd5
commit dec3dfa3cf

View file

@ -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.