1 | "use strict";
|
2 |
|
3 | var Common = require("../lib/boilerplate.view.common");
|
4 |
|
5 |
|
6 | describe('[boilerplate.view.common', function() {
|
7 | describe('camelCase', function() {
|
8 | var check = function( given, expected ) {
|
9 | it('should convert ' + JSON.stringify(given) + " into " + JSON.stringify(expected),
|
10 | function() {
|
11 | expect( Common.camelCase(given) ).toBe( expected );
|
12 | });
|
13 | };
|
14 | check( "verbatim", "verbatim" );
|
15 | check( "textContent", "textContent" );
|
16 | check( "tfw.view.button", "tfwViewButton" );
|
17 | check( "tfw-view-button", "tfwViewButton" );
|
18 | check( "tfw-view.button", "tfwViewButton" );
|
19 | check( "tfw.view.button", "tfwViewButton" );
|
20 | });
|
21 |
|
22 | describe('CamelCase', function() {
|
23 | var check = function( given, expected ) {
|
24 | it('should convert ' + JSON.stringify(given) + " into " + JSON.stringify(expected),
|
25 | function() {
|
26 | expect( Common.CamelCase(given) ).toBe( expected );
|
27 | });
|
28 | };
|
29 | check( "verbatim", "Verbatim" );
|
30 | check( "textContent", "TextContent" );
|
31 | check( "tfw.view.button", "TfwViewButton" );
|
32 | check( "tfw-view-button", "TfwViewButton" );
|
33 | check( "tfw-view.button", "TfwViewButton" );
|
34 | check( "tfw.view.button", "TfwViewButton" );
|
35 | });
|
36 | });
|