Skip to content

Commit ea8ef82

Browse files
authored
Fix flaky NavigationMapViewTests (#4385)
1 parent e21265a commit ea8ef82

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Tests/MapboxNavigationTests/NavigationMapViewTests.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ class NavigationMapViewTests: TestCase {
1212
CLLocationCoordinate2D(latitude: 29.99908, longitude: -102.828197),
1313
]))
1414
var navigationMapView: NavigationMapView!
15+
var navigator: CoreNavigator!
1516

1617
let options: NavigationRouteOptions = .init(coordinates: [
1718
CLLocationCoordinate2D(latitude: 40.311012, longitude: -112.47926),
@@ -23,11 +24,13 @@ class NavigationMapViewTests: TestCase {
2324
}()
2425

2526
override func setUp() {
27+
navigator = Navigator.shared
2628
super.setUp()
2729
navigationMapView = NavigationMapView(frame: CGRect(origin: .zero, size: .iPhone6Plus))
2830
}
2931

3032
override func tearDown() {
33+
navigator = nil
3134
navigationMapView = nil
3235
super.tearDown()
3336
}

0 commit comments

Comments
 (0)