@@ -21,14 +21,18 @@ import { sleep } from '@salesforce/kit';
2121
2222/* eslint-disable no-console */
2323
24+ /**
25+ * Shared test session and connection variables.
26+ * These are set up once in the before hook and exported for use by all test modules.
27+ */
2428export let session : TestSession ;
2529export let username : string ;
2630export let defaultOrg : Org ;
2731export let connection : ReturnType < Org [ 'getConnection' ] > ;
2832
2933/**
30- * Shared setup for all NUT tests.
31- * Creates a single scratch org that all tests will use .
34+ * Main test setup - creates a single scratch org that all tests will use .
35+ * This runs once before all test suites .
3236 */
3337before ( async function ( ) {
3438 this . timeout ( 600_000 ) ; // 10 minutes for setup
@@ -74,12 +78,21 @@ before(async function () {
7478} ) ;
7579
7680/**
77- * Shared cleanup for all NUT tests.
78- * Cleans up the shared scratch org after all tests complete.
81+ * Main test cleanup - cleans up the shared scratch org after all tests complete.
7982 */
8083after ( async function ( ) {
8184 this . timeout ( 60_000 ) ; // 1 minute for cleanup
8285 if ( session ) {
8386 await session . clean ( ) ;
8487 }
8588} ) ;
89+
90+ /**
91+ * Import all test modules that use the shared setup.
92+ * These modules will have access to the session, username, connection, and defaultOrg
93+ * variables exported above.
94+ */
95+ import './agent.nut.js' ;
96+ import './agent.generate.authoring-bundle.nut.js' ;
97+ import './agent.publish.nut.js' ;
98+ import './agent.validate.nut.js' ;
0 commit comments