mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 19:07:49 +00:00
First pass at astral symbols tests.
This commit is contained in:
18
test/test.js
18
test/test.js
@@ -18821,6 +18821,24 @@
|
|||||||
|
|
||||||
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
QUnit.module('astral symbols');
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
var string = 'I \uD83D\uDC95 the \uD83C\uDF42';
|
||||||
|
|
||||||
|
QUnit.test('should account for astral symbols', function(assert) {
|
||||||
|
assert.expect(5);
|
||||||
|
|
||||||
|
assert.strictEqual(_.size(string), 9);
|
||||||
|
assert.strictEqual(_.pad(string, 12), ' ' + string + ' ');
|
||||||
|
assert.strictEqual(_.padLeft(string, 12), ' ' + string);
|
||||||
|
assert.strictEqual(_.padRight(string, 12), string + ' ');
|
||||||
|
assert.deepEqual(_.toArray(string), ['I', ' ', '\uD83D\uDC95', ' ', 't', 'h', 'e', ' ', '\uD83C\uDF42']);
|
||||||
|
});
|
||||||
|
}());
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------------------*/
|
||||||
|
|
||||||
QUnit.module('lodash.unescape');
|
QUnit.module('lodash.unescape');
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user