 
 final class CustomViewTests: XCTestCase {
     
-    func testLocalStateChangesOnView() throws {
+    func testDeprecatedOnFunction() throws {
         var sut = LocalStateTestView(flag: false)
         let exp = sut.on(\.didAppear) { view in
             XCTAssertFalse(view.flag)

    }
    
    func testEnvironmentStateChanges1() throws {
        var sut = EnvironmentStateTestView()
        let viewModel = ExternalState()
        let exp = sut.on(\.didAppear) { view in
            let text1 = try view.inspect().text().string()
            XCTAssertEqual(text1, "obj1")
            viewModel.value = "abc"
            let text2 = try view.inspect().text().string()
            XCTAssertEqual(text2, "abc")
        }
        ViewHosting.host(view: sut.environmentObject(viewModel))

        wait(for: [exp], timeout: 0.1)
    }
    
    func testStateMutationOnPublisherUpdate() throws {
        let sut = LocalStateTestView(flag: false)
        let exp1 = sut.inspection.inspect { view in
            let text = try view.button().text().string()
            XCTAssertEqual(text, "false")
            sut.publisher.send(true)
        }
        let exp2 = sut.inspection.inspect(after: 0.1) { view in
            let text = try view.button().text().string()
            XCTAssertEqual(text, "true")
        }
        ViewHosting.host(view: sut)
        wait(for: [exp1, exp2], timeout: 0.2)
