Skip to content

Commit

Permalink
fix: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
joonchrislee committed Sep 21, 2022
1 parent 74d2836 commit 67ab5cf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Tests/TokenTextViewTests/TokenTextViewTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ final class TokenTextViewTests: XCTestCase {

var mockPlainText: String!
var mockTemplateText: String!
var mockTokens: [Token]!
var mockTokens: [TemplateToken]!
var mockTokenInstances: [TokenInstance]!
var tokenTextView: TokenTextView!
var tokenTextViewMirror: TokenTextViewMirror!
Expand Down Expand Up @@ -245,7 +245,7 @@ extension TokenTextViewTests {
if let path = Bundle.module.path(forResource: "MockTokens", ofType: "json") {
do {
let jsonData = try Data(contentsOf: URL(fileURLWithPath: path))
let jsonResult = try JSONDecoder().decode([Token].self, from: jsonData)
let jsonResult = try JSONDecoder().decode([TemplateToken].self, from: jsonData)
self.mockTokens = jsonResult
} catch {
print("Could not decode Tokens.json")
Expand All @@ -270,7 +270,7 @@ extension TokenTextViewTests {
guard let length = object["range"]?["length"] as? Int else {
continue
}
mockTokenInstances.append(TokenInstance(token: Token(name: name, identifier: identifier), range: NSRange(location: location, length: length)))
mockTokenInstances.append(TokenInstance(token: TemplateToken(name: name, identifier: identifier), range: NSRange(location: location, length: length)))
}
self.mockTokenInstances = mockTokenInstances
} catch {
Expand Down

0 comments on commit 67ab5cf

Please sign in to comment.