UNPKG

nba

Version:

JavaScript client for the NBA's stats API

29 lines (23 loc) 1.03 kB
"use strict"; var string = require("../../../src/util/string"); var expect = require("expect"); describe("string.downCaseFirst()", function () { it("should downcase the first character in a string if it's a letter", function () { var result = string.downcaseFirst("HelloWorld"); expect(result).toEqual("helloWorld"); }); }); describe("string.unDashHyphen()", function () { it("should remove any hyphens in a string and uppercase the following character", function () { var result = string.unDashHyphen("hello-there-world"); expect(result).toEqual("helloThereWorld"); }); it("should remove any underscores in a string and uppercase the following character", function () { var result = string.unDashHyphen("hello_there_world"); expect(result).toEqual("helloThereWorld"); }); it("should remove any spaces in a string and uppercase the following character", function () { var result = string.unDashHyphen("hello there world"); expect(result).toEqual("helloThereWorld"); }); });