Skip to content

Commit ff05b22

Browse files
committed
test: more esm fix
1 parent aa8cf47 commit ff05b22

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/unit/org/delete.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
* Licensed under the BSD 3-Clause license.
55
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
66
*/
7+
import { dirname } from 'node:path';
8+
import { fileURLToPath } from 'node:url';
79
import { AuthInfo, Messages, Org, SfError } from '@salesforce/core';
810
import { MockTestOrgData, TestContext } from '@salesforce/core/lib/testSetup.js';
911
import { SinonStub } from 'sinon';
@@ -15,7 +17,7 @@ import DeleteScratch from '../../../src/commands/org/delete/scratch.js';
1517

1618
config.truncateThreshold = 0;
1719

18-
Messages.importMessagesDirectory(__dirname);
20+
Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
1921
const sbxOrgMessages = Messages.loadMessages('@salesforce/plugin-org', 'delete_sandbox');
2022
const scratchOrgMessages = Messages.loadMessages('@salesforce/plugin-org', 'delete_scratch');
2123
const deleteMessages = Messages.loadMessages('@salesforce/plugin-org', 'delete');

0 commit comments

Comments
 (0)