Skip to content

Commit 6c8a5cf

Browse files
linkdotnetegil
authored andcommitted
fix: Wrong code in documentation
1 parent 7a69073 commit 6c8a5cf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs/site/docs/providing-input/substituting-components.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ A popular technique in JavaScript-based frontend testing is "shallow rendering".
269269
This is possible in bUnit as well, using the type predicate technique discussed above. For example, to shallow render `<Foo>` using the built-in stub in bUnit, do the following:
270270

271271
```csharp
272-
ComponentFactories.AddStub<Foo>(type => type != typeof(Foo));
272+
ComponentFactories.AddStub(type => type != typeof(Foo));
273273
```
274274

275275
This will tell bUnit to stub out all components in the render tree that is NOT `<Foo>`. This can also be achieved using a mocking framework. See the example in the previous section above for how to dynamically create component mocks using Moq.

0 commit comments

Comments
 (0)