test($compile): Update leak test with a stronger test

Update the test for the leak on asynchronous compilation
on destroyed scopes with a stronger test