diff options
| author | Henry Jameson <me@hjkos.com> | 2019-04-10 21:48:42 +0300 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2019-04-10 21:48:42 +0300 |
| commit | 262760d2586cac48da27cf7eb5389116d4023dfe (patch) | |
| tree | a4c9393df0da43409fcce9b1b41b4611f33cccb6 /test/unit/specs/services/entity_normalizer | |
| parent | 6471bec0d962a13b272c2c55807492c86b859256 (diff) | |
revert unnecessary changes
Diffstat (limited to 'test/unit/specs/services/entity_normalizer')
| -rw-r--r-- | test/unit/specs/services/entity_normalizer/entity_normalizer.spec.js | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/test/unit/specs/services/entity_normalizer/entity_normalizer.spec.js b/test/unit/specs/services/entity_normalizer/entity_normalizer.spec.js index e0e63fd9..2b0b0d6d 100644 --- a/test/unit/specs/services/entity_normalizer/entity_normalizer.spec.js +++ b/test/unit/specs/services/entity_normalizer/entity_normalizer.spec.js @@ -160,6 +160,12 @@ const makeMockEmojiMasto = (overrides = [{}]) => { ] } +parseNotification +parseUser +parseStatus +makeMockStatusQvitter +makeMockUserQvitter + describe('API Entities normalizer', () => { describe('parseStatus', () => { describe('QVitter preprocessing', () => { @@ -197,15 +203,15 @@ describe('API Entities normalizer', () => { }) it('sets nsfw for statuses with the #nsfw tag', () => { - const safe = makeMockStatusQvitter({ id: '1', text: 'Hello oniichan' }) - const nsfw = makeMockStatusQvitter({ id: '1', text: 'Hello oniichan #nsfw' }) + const safe = makeMockStatusQvitter({id: '1', text: 'Hello oniichan'}) + const nsfw = makeMockStatusQvitter({id: '1', text: 'Hello oniichan #nsfw'}) expect(parseStatus(safe).nsfw).to.eq(false) expect(parseStatus(nsfw).nsfw).to.eq(true) }) it('leaves existing nsfw settings alone', () => { - const nsfw = makeMockStatusQvitter({ id: '1', text: 'Hello oniichan #nsfw', nsfw: false }) + const nsfw = makeMockStatusQvitter({id: '1', text: 'Hello oniichan #nsfw', nsfw: false}) expect(parseStatus(nsfw).nsfw).to.eq(false) }) @@ -314,9 +320,9 @@ describe('API Entities normalizer', () => { describe('MastoAPI emoji adder', () => { const emojis = makeMockEmojiMasto() const imageHtml = '<img src="https://example.com/image.png" alt="image" class="emoji" />' - .replace(/"/g, '\'') + .replace(/"/g, '\'') const thinkHtml = '<img src="https://example.com/think.png" alt="thinking" class="emoji" />' - .replace(/"/g, '\'') + .replace(/"/g, '\'') it('correctly replaces shortcodes in supplied string', () => { const result = addEmojis('This post has :image: emoji and :thinking: emoji', emojis) |
