<PackageReference Include="NUnit" Version="4.6.0" />

NUnit.Framework.UnhandledExceptionHandling

Flag to change how NUnit deals with exceptions unhandled by the test code.
Default = 0

This value is provided for clarity and to explicitly indicate the default handling behavior.

Error = 0

Unhandled exceptions will be treated as test errors. This is the default behavior matching what NUnit does if an exception is thrown in the test thread.

Ignore = 1

Unhandled exceptions will be ignored and not cause the test to fail. This is not recommended, as it may hide issues in the test code or the system under test.