Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F7188877
insert_nbsp.test.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
728 B
Referenced Files
None
Subscribers
None
insert_nbsp.test.ts
View Options
import
assert
from
"assert"
;
import
{
insert_nbsp
}
from
"./insert_nbsp.js"
;
describe
(
"create non braking space util"
,
()
=>
{
it
(
"should replace space for one letter word with non braking space"
,
async
()
=>
{
const
example
=
"Taki o to przykład!"
;
assert
.
strictEqual
(
insert_nbsp
(
example
),
"Taki o to przykład!"
);
});
it
(
"should keep original copy if there isn't any one letter word"
,
async
()
=>
{
const
example
=
"Uwaga przykład!"
;
assert
.
strictEqual
(
insert_nbsp
(
example
),
example
);
});
it
(
"shold find one letter word on first position"
,
async
()
=>
{
const
example
=
"O taką Polskę walczyłem"
;
assert
.
strictEqual
(
insert_nbsp
(
example
),
"O taką Polskę walczyłem"
);
});
});
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Tue, Jul 8, 08:34 (7 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
774659
Default Alt Text
insert_nbsp.test.ts (728 B)
Attached To
Mode
rJDD jdd
Attached
Detach File
Event Timeline
Log In to Comment