Skip to content

Commit

Permalink
fix: Wrong code in documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
linkdotnet authored and egil committed Jun 27, 2023
1 parent 7a69073 commit 6c8a5cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/site/docs/providing-input/substituting-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ A popular technique in JavaScript-based frontend testing is "shallow rendering".
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:

```csharp
ComponentFactories.AddStub<Foo>(type => type != typeof(Foo));
ComponentFactories.AddStub(type => type != typeof(Foo));
```

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 comments on commit 6c8a5cf

Please sign in to comment.