Swift package manager - fatal error in unit tests on assertionFailure

During the translation of the app's module on SPM I encountered a problem. When executing unit tests, it crashes in any asssertionFailure.
Is it possible to customize a package with SWIFT_OPTIMIZATION_LEVEL -O , to asserts has no effect?
The following settings did not give the proper effect in generating the project file.

  .target(
       name: "TargetName",
       cSettings: [
           .define("SWIFT_OPTIMIZATION_LEVEL", to: "-O", .when(configuration: .debug))
       ],
       swiftSettings:[
           .define("SWIFT_OPTIMIZATION_LEVEL=-O", .when(configuration: .debug))
       ]
   ),
   .testTarget(
      name: "TargetNameTests",
      dependencies: ["TargetName"],
      cSettings: [
              .define("SWIFT_OPTIMIZATION_LEVEL", to: "-O", .when(configuration: .debug))
           ],
       swiftSettings:[
           .define("SWIFT_OPTIMIZATION_LEVEL=-O", .when(configuration: .debug))
       ]
   ),
Terms of Service

Privacy Policy

Cookie Policy