mirror of
https://github.com/discourse/discourse.git
synced 2025-02-17 09:12:45 +08:00
DEV: Fix Prettier
This commit is contained in:
parent
6debd72c6c
commit
1de5d10f61
|
@ -3,33 +3,31 @@ import { translateResults } from "discourse/lib/search";
|
||||||
QUnit.module("lib:search");
|
QUnit.module("lib:search");
|
||||||
|
|
||||||
QUnit.test("unescapesEmojisInBlurbs", assert => {
|
QUnit.test("unescapesEmojisInBlurbs", assert => {
|
||||||
const source = {
|
const source = {
|
||||||
posts: [
|
posts: [
|
||||||
{
|
{
|
||||||
id: 160,
|
id: 160,
|
||||||
username: "pmusaraj",
|
username: "pmusaraj",
|
||||||
avatar_template:
|
avatar_template: "/user_avatar/localhost/pmusaraj/{size}/3_2.png",
|
||||||
"/user_avatar/localhost/pmusaraj/{size}/3_2.png",
|
created_at: "2019-07-22T03:47:04.864Z",
|
||||||
created_at: "2019-07-22T03:47:04.864Z",
|
like_count: 1,
|
||||||
like_count: 1,
|
blurb: ":thinking: This here is a test of emojis in search blurbs.",
|
||||||
blurb:
|
post_number: 1,
|
||||||
":thinking: This here is a test of emojis in search blurbs.",
|
topic_id: 41
|
||||||
post_number: 1,
|
}
|
||||||
topic_id: 41
|
],
|
||||||
}
|
topics: [],
|
||||||
],
|
users: [],
|
||||||
topics: [],
|
categories: [],
|
||||||
users: [],
|
tags: [],
|
||||||
categories: [],
|
groups: [],
|
||||||
tags: [],
|
grouped_search_result: false
|
||||||
groups: [],
|
};
|
||||||
grouped_search_result: false
|
|
||||||
};
|
|
||||||
|
|
||||||
const results = translateResults(source);
|
const results = translateResults(source);
|
||||||
const blurb = results.posts[0].get("blurb");
|
const blurb = results.posts[0].get("blurb");
|
||||||
|
|
||||||
assert.ok(blurb.indexOf("thinking.png"));
|
assert.ok(blurb.indexOf("thinking.png"));
|
||||||
assert.ok(blurb.indexOf("<img src") === 0);
|
assert.ok(blurb.indexOf("<img src") === 0);
|
||||||
assert.ok(blurb.indexOf(":thinking:") === -1);
|
assert.ok(blurb.indexOf(":thinking:") === -1);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user