ocket8888 commented on a change in pull request #6232:
URL: https://github.com/apache/trafficcontrol/pull/6232#discussion_r719629344



##########
File path: traffic_portal/test/integration/specs/Profiles.spec.ts
##########
@@ -94,12 +94,9 @@ profiles.tests.forEach(async profilesData => {
         });
     });
 });
-
 describe('Clean up API for Profiles', () => {
-    afterAll(async function () {
-        it('Cleanup', async () => {
-            await api.UseAPI(profiles.cleanup);
-        });
-    })
+    it('Cleanup', async () => {
+        await api.UseAPI(profiles.cleanup);
+    });

Review comment:
       Yeah, I wouldn't expect it to actually run. Like the docs say:
   
   > Run some shared teardown once after all of the specs in the `describe` are 
run.
   
   That `describe` contains no specs. The `afterAll` should be in the same 
`describe` as the specs _after all_ of which the `afterAll` block will run.
   
   See in this demo:
   
   https://jsfiddle.net/62pefumq/
   
   After running it, there should be two debug-level logs in the console: "in 
afterAll 1" and "in afterAll 3". "in afterAll 2" doesn't get printed because 
its `describe` contains no specs.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to