Skip to content

Commit

Permalink
Remove unused test
Browse files Browse the repository at this point in the history
  • Loading branch information
psharanda committed Apr 23, 2020
1 parent 698a341 commit b419e0b
Showing 1 changed file with 0 additions and 43 deletions.
43 changes: 0 additions & 43 deletions Tests/JetpackTests/JetpackTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -839,49 +839,6 @@ class JetpackTests: XCTestCase {
then()
}

func testReactive() {

let expect = expectation(description: "result")

class ViewModel {
@Reactive(ui: true) public private(set) var counter = 0
@Subject<Void>(ui: true) public private(set) var didFinish

func touch() {
_counter.mutableProperty.update(0)
_didFinish.publishSubject.update()
}
}

let viewModel = ViewModel()

_ = viewModel.$didFinish.subscribe { _ in
XCTAssertTrue(Thread.isMainThread)
}

_ = viewModel.$counter.subscribe { _ in
XCTAssertTrue(Thread.isMainThread)
}

let numberOfQueues = 20
let numberOfIterations = 10

expect.expectedFulfillmentCount = numberOfQueues

for _ in 0..<numberOfQueues {
DispatchQueue.global(qos: .utility).async {
for _ in 0..<numberOfIterations {
viewModel.touch()
}
expect.fulfill()
}
}

self.waitForExpectations(timeout: 3) { error in
XCTAssertNil(error)
}
}

func testDeadlock() {
let p = MutableProperty(0)

Expand Down

0 comments on commit b419e0b

Please sign in to comment.