mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:41:17 +08:00
Retry: Rename all test files from JS -> ES6
This commit is contained in:
20
test/javascripts/lib/break-string-test.js
Normal file
20
test/javascripts/lib/break-string-test.js
Normal 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>​Mans<wbr>​11");
|
||||
assert.equal(b("he_man"), "he_<wbr>​man");
|
||||
assert.equal(b("he11111"), "he<wbr>​11111");
|
||||
assert.equal(b("HRCBob"), "HRC<wbr>​Bob");
|
||||
assert.equal(
|
||||
b("bobmarleytoo", "Bob Marley Too"),
|
||||
"bob<wbr>​marley<wbr>​too"
|
||||
);
|
||||
});
|
Reference in New Issue
Block a user