anchor.diff:      }
     }
   
  +  test_watch_null() async {
  +    writeFile('/test/.packages', 'test:lib/');
  +    String aPath = '/test/lib/a.dart';
  +    String bPath = '/test/lib/b.dart';
  +    writeFile(aPath, "");
  +    Uri bUri = writeFile(bPath, "");
  +
  +    // Set null, as if the watch function is not provided.
  +    watchFn = null;
  +
  +    await getInitialState(bUri);
  +
  +    // Update b.dart to import a.dart file.
  +    writeFile(bPath, "import 'a.dart';");
  +    incrementalKernelGenerator.invalidate(bUri);
  +    await incrementalKernelGenerator.computeDelta();
  +
  +    // No exception even though the watcher function is null.
  +  }
  +
     /// Write the given [text] of the file with the given [path] into the
     /// virtual filesystem.  Return the URI of the file.
     Uri writeFile(String path, String text) {
  
positive.code:     contents.forEach(writeFile);
    }
  
    void _assertLibraryUris(Program program,
        {List<Uri> includes: const [], List<Uri> excludes: const []}) {
      List<Uri> libraryUris =
  
negative.code:     }
    }
  
    test_compile_typedef() async {
      writeFile('/test/.packages', 'test:lib/');
      String aPath = '/test/lib/a.dart';
  