DEV: Remove unused BreakString class (#8942)

This commit is contained in:
Roman Rizzi
2020-02-14 15:32:59 -03:00
committed by GitHub
parent 92bb7b9269
commit 99305511bc
5 changed files with 21 additions and 70 deletions

View File

@ -0,0 +1,20 @@
/* global BreakString:true */
QUnit.module("lib:breakString", {});
QUnit.test("breakString", assert => {
var b = function(s, hint) {
return new BreakString(s).break(hint);
};
assert.equal(b("hello"), "hello");
assert.equal(b("helloworld"), "helloworld");
assert.equal(b("HeMans11"), "He<wbr>&#8203;Mans<wbr>&#8203;11");
assert.equal(b("he_man"), "he_<wbr>&#8203;man");
assert.equal(b("he11111"), "he<wbr>&#8203;11111");
assert.equal(b("HRCBob"), "HRC<wbr>&#8203;Bob");
assert.equal(
b("bobmarleytoo", "Bob Marley Too"),
"bob<wbr>&#8203;marley<wbr>&#8203;too"
);
});

View File

@ -4,7 +4,6 @@ import {
relativeAge,
autoUpdatingRelativeAge,
updateRelativeAge,
breakUp,
number,
longDate,
durationTiny
@ -211,23 +210,6 @@ QUnit.test("updateRelativeAge", assert => {
assert.equal($elem.html(), "2 mins ago");
});
QUnit.test("breakUp", assert => {
var b = function(s, hint) {
return breakUp(s, hint);
};
assert.equal(b("hello"), "hello");
assert.equal(b("helloworld"), "helloworld");
assert.equal(b("HeMans11"), "He<wbr>&#8203;Mans<wbr>&#8203;11");
assert.equal(b("he_man"), "he_<wbr>&#8203;man");
assert.equal(b("he11111"), "he<wbr>&#8203;11111");
assert.equal(b("HRCBob"), "HRC<wbr>&#8203;Bob");
assert.equal(
b("bobmarleytoo", "Bob Marley Too"),
"bob<wbr>&#8203;marley<wbr>&#8203;too"
);
});
QUnit.test("number", assert => {
assert.equal(number(123), "123", "it returns a string version of the number");
assert.equal(number("123"), "123", "it works with a string command");

View File

@ -33,6 +33,7 @@
//= require helpers/assertions
//= require break_string
//= require helpers/qunit-helpers
//= require_tree ./fixtures
//= require_tree ./lib