blob: cb722eca23141ec895132ce9b268921b991e2f44 [file] [log] [blame] [view]
# Inspect.forTesting constructor
*[<Null safety>](https://dart.dev/null-safety)*
Inspect.forTesting([FakeVmoHolder](../../package-fuchsia_inspect_testing/FakeVmoHolder-class.md) vmo)
<p>Returns a new <a href="../../package-fuchsia_inspect_inspect/Inspect-class.md">Inspect</a> object at root.inspect backed by a fake VMO
intended for unit testing inspect integrations, so that they can run as
host tests.</p>
## Implementation
```dart
factory Inspect.forTesting(FakeVmoHolder vmo) {
// Legacy dart analyzer might warn about this.
// ignore: unnecessary_cast
return InspectImpl(VmoWriter.withVmo(vmo as VmoHolder));
}
```