Skip to content

Commit

Permalink
Merge branch 'stable'
Browse files Browse the repository at this point in the history
  • Loading branch information
bUnitBot committed Jun 27, 2023
2 parents 15b3b4d + 6c8a5cf commit 7b4a942
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 7b4a942

Please sign in to comment.