File tree Expand file tree Collapse file tree 1 file changed +0
-43
lines changed Expand file tree Collapse file tree 1 file changed +0
-43
lines changed Original file line number Diff line number Diff line change @@ -839,49 +839,6 @@ class JetpackTests: XCTestCase {
839
839
then ( )
840
840
}
841
841
842
- func testReactive( ) {
843
-
844
- let expect = expectation ( description: " result " )
845
-
846
- class ViewModel {
847
- @Reactive ( ui: true ) public private( set) var counter = 0
848
- @Subject < Void > ( ui: true ) public private( set) var didFinish
849
-
850
- func touch( ) {
851
- _counter. mutableProperty. update ( 0 )
852
- _didFinish. publishSubject. update ( )
853
- }
854
- }
855
-
856
- let viewModel = ViewModel ( )
857
-
858
- _ = viewModel. $didFinish. subscribe { _ in
859
- XCTAssertTrue ( Thread . isMainThread)
860
- }
861
-
862
- _ = viewModel. $counter. subscribe { _ in
863
- XCTAssertTrue ( Thread . isMainThread)
864
- }
865
-
866
- let numberOfQueues = 20
867
- let numberOfIterations = 10
868
-
869
- expect. expectedFulfillmentCount = numberOfQueues
870
-
871
- for _ in 0 ..< numberOfQueues {
872
- DispatchQueue . global ( qos: . utility) . async {
873
- for _ in 0 ..< numberOfIterations {
874
- viewModel. touch ( )
875
- }
876
- expect. fulfill ( )
877
- }
878
- }
879
-
880
- self . waitForExpectations ( timeout: 3 ) { error in
881
- XCTAssertNil ( error)
882
- }
883
- }
884
-
885
842
func testDeadlock( ) {
886
843
let p = MutableProperty ( 0 )
887
844
You can’t perform that action at this time.
0 commit comments