github.com/sl1pm4t/consul@v1.4.5-0.20190325224627-74c31c540f9c/ui-v2/tests/unit/utils/ucfirst-test.js (about) 1 import { module } from 'ember-qunit'; 2 import test from 'ember-sinon-qunit/test-support/test'; 3 import ucfirst from 'consul-ui/utils/ucfirst'; 4 module('Unit | Utils | ucfirst', {}); 5 6 test('it returns the first letter in uppercase', function(assert) { 7 [ 8 { 9 test: 'hello world', 10 expected: 'Hello world', 11 }, 12 { 13 test: 'hello World', 14 expected: 'Hello World', 15 }, 16 { 17 test: 'HELLO WORLD', 18 expected: 'HELLO WORLD', 19 }, 20 { 21 test: 'hELLO WORLD', 22 expected: 'HELLO WORLD', 23 }, 24 ].forEach(function(item) { 25 const actual = ucfirst(item.test); 26 assert.equal(actual, item.expected); 27 }); 28 });