-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Andrii Momot
committed
Nov 13, 2024
1 parent
0b7f9cd
commit 5e22dcb
Showing
2 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
FinniversKit/UnitTests/Extensions/StringExtensionsTests.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import XCTest | ||
@testable import FinniversKit | ||
|
||
final class StringExtensionsTests: XCTestCase { | ||
func testWithoutEmojiExtension() throws { | ||
let stringFI = "Push-notifikaatiosi ovat pois päältä, lisää myyntimahdollisuuksiasi ottamalla push-notifikaatiot käyttöön." | ||
let resultFI = stringFI.withoutEmoji() | ||
XCTAssertEqual(resultFI, stringFI) | ||
|
||
let stringNO = "Treg respons er en dealbreaker – skru på varslinger så du lettere får solgt varene dine 💰" | ||
let resultNO = stringNO.withoutEmoji() | ||
XCTAssertEqual(resultNO, "Treg respons er en dealbreaker – skru på varslinger så du lettere får solgt varene dine ") | ||
|
||
let stringEN = "Your push notifications are turned off" | ||
let resultEN = stringEN.withoutEmoji() | ||
XCTAssertEqual(resultEN, stringEN) | ||
|
||
let string1 = "Hello, 👋" | ||
let result1 = string1.withoutEmoji() | ||
XCTAssertEqual(result1, "Hello, ") | ||
|
||
let string2 = "👦 Hello, 👋" | ||
let result2 = string2.withoutEmoji() | ||
XCTAssertEqual(result2, " Hello, ") | ||
} | ||
} |