             notificationExpectation.fulfill()
         }
         
+        // Can't test observedRegion because it is defined asynchronously
+        
         try withExtendedLifetime(observer) {
             try dbQueue.inDatabase { db in
                 try db.execute(sql: "INSERT INTO a VALUES (1)") // 1

import XCTest
#if GRDBCUSTOMSQLITE
    import GRDBCustomSQLite
#else
    import GRDB
#endif

class ValueObservationRegionRecordingTests: GRDBTestCase {
    func testRegionRecording() throws {
        let dbQueue = try makeDatabaseQueue()
        try dbQueue.write {
            try $0.execute(sql: """

            
            waitForExpectations(timeout: 1, handler: nil)
            XCTAssertEqual(results, [0, 1, 2, 3])
            
            let token = observer as! ValueObserverToken<ValueReducers.Fetch<Int>> // Non-public implementation detail
            XCTAssertEqual(token.observer.observedRegion.description, "b(*),source(name)")
        }
    }
    
    func testAsyncSchedulingWithoutInitialFetch() throws {
        let dbQueue = try makeDatabaseQueue()
        try dbQueue.write {
            try $0.execute(sql: """
