It’s not the purpose behind them but it doesn’t serve to protect the resources that are being tested. For some stuff with one of our Step Functions I wrote a bunch of tests to ensure they have a base set of permissions, that certain lambdas have specific names, etc… It means that if someone changes any of the tested details the tests will fail and the deployment won’t process.
It requires the person making the changes to think about the change and either change the test or change the stack to fit the test constraints.