From 1e6e20e62cffbda9d9c67ae9a1103c9dd3a74a26 Mon Sep 17 00:00:00 2001 From: mshanemc Date: Mon, 13 Nov 2023 09:31:23 -0600 Subject: [PATCH] test: nut fixes for esm --- package.json | 12 ++++++------ test/nuts/digitalExperienceBundle/constants.ts | 2 +- test/nuts/retrieve/partialBundleDelete.nut.ts | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index a5c96d68..42dd7c3b 100644 --- a/package.json +++ b/package.json @@ -110,16 +110,16 @@ "prepack": "sf-prepack", "prepare": "sf-install", "test": "wireit", - "test:nuts": "node --experimental-specifier-resolution=node ./test/nuts/generateNuts.ts && nyc mocha \"**/*.nut.ts\" --slow 4500 --timeout 1200000 --parallel --retries 0 --jobs 10", + "test:nuts": "node --experimental-specifier-resolution=node --loader ts-node/esm ./test/nuts/generateNuts.ts && nyc mocha \"**/*.nut.ts\" --slow 4500 --timeout 1200000 --parallel --retries 0 --jobs 10", "test:nuts:convert": "nyc mocha \"test/nuts/convert/*.nut.ts\" --slow 4500 --timeout 1200000 --parallel --retries 0 --jobs 20", "test:nuts:deb": "nyc mocha \"test/nuts/digitalExperienceBundle/*.nut.ts\" --slow 4500 --timeout 1200000 --parallel --retries 0 --jobs 20", "test:nuts:delete": "nyc mocha \"test/nuts/delete/*.nut.ts\" --slow 4500 --timeout 1200000 --parallel --retries 0 --jobs 20", "test:nuts:deploy": "nyc mocha \"test/nuts/deploy/*.nut.ts\" --slow 4500 --timeout 1200000 --parallel --retries 0 --jobs 20", - "test:nuts:deploy:metadata:manifest": "cross-env PLUGIN_DEPLOY_RETRIEVE_SEED_FILTER=deploy.metadata.manifest node --experimental-specifier-resolution=node ./test/nuts/generateNuts.ts && mocha \"test/nuts/generated/*.nut.ts\" --slow 4500 --timeout 1200000 --parallel --retries 0 --jobs 20", - "test:nuts:deploy:metadata:metadata": "cross-env PLUGIN_DEPLOY_RETRIEVE_SEED_FILTER=deploy.metadata.metadata node --experimental-specifier-resolution=node ./test/nuts/generateNuts.ts && mocha \"test/nuts/generated/*.nut.ts\" --slow 4500 --timeout 1200000 --parallel --retries 0 --jobs 20", - "test:nuts:deploy:metadata:metadata-dir": "cross-env PLUGIN_DEPLOY_RETRIEVE_SEED_FILTER=deploy.metadata.metadata-dir node --experimental-specifier-resolution=node ./test/nuts/generateNuts.ts && mocha \"test/nuts/generated/*.nut.ts\" --slow 4500 --timeout 1200000 --parallel --retries 0 --jobs 20", - "test:nuts:deploy:metadata:source-dir": "cross-env PLUGIN_DEPLOY_RETRIEVE_SEED_FILTER=deploy.metadata.source-dir node --experimental-specifier-resolution=node ./test/nuts/generateNuts.ts && mocha \"test/nuts/generated/*.nut.ts\" --slow 4500 --timeout 1200000 --parallel --retries 0 --jobs 20", - "test:nuts:deploy:metadata:test-level": "cross-env PLUGIN_DEPLOY_RETRIEVE_SEED_FILTER=deploy.metadata.test-level node --experimental-specifier-resolution=node ./test/nuts/generateNuts.ts && mocha \"test/nuts/generated/*.nut.ts\" --slow 4500 --timeout 1200000 --parallel --retries 0 --jobs 20", + "test:nuts:deploy:metadata:manifest": "cross-env PLUGIN_DEPLOY_RETRIEVE_SEED_FILTER=deploy.metadata.manifest node --experimental-specifier-resolution=node --loader ts-node/esm ./test/nuts/generateNuts.ts && mocha \"test/nuts/generated/*.nut.ts\" --slow 4500 --timeout 1200000 --parallel --retries 0 --jobs 20", + "test:nuts:deploy:metadata:metadata": "cross-env PLUGIN_DEPLOY_RETRIEVE_SEED_FILTER=deploy.metadata.metadata node --experimental-specifier-resolution=node --loader ts-node/esm ./test/nuts/generateNuts.ts && mocha \"test/nuts/generated/*.nut.ts\" --slow 4500 --timeout 1200000 --parallel --retries 0 --jobs 20", + "test:nuts:deploy:metadata:metadata-dir": "cross-env PLUGIN_DEPLOY_RETRIEVE_SEED_FILTER=deploy.metadata.metadata-dir node --experimental-specifier-resolution=node --loader ts-node/esm ./test/nuts/generateNuts.ts && mocha \"test/nuts/generated/*.nut.ts\" --slow 4500 --timeout 1200000 --parallel --retries 0 --jobs 20", + "test:nuts:deploy:metadata:source-dir": "cross-env PLUGIN_DEPLOY_RETRIEVE_SEED_FILTER=deploy.metadata.source-dir node --experimental-specifier-resolution=node --loader ts-node/esm ./test/nuts/generateNuts.ts && mocha \"test/nuts/generated/*.nut.ts\" --slow 4500 --timeout 1200000 --parallel --retries 0 --jobs 20", + "test:nuts:deploy:metadata:test-level": "cross-env PLUGIN_DEPLOY_RETRIEVE_SEED_FILTER=deploy.metadata.test-level node --experimental-specifier-resolution=node --loader ts-node/esm ./test/nuts/generateNuts.ts && mocha \"test/nuts/generated/*.nut.ts\" --slow 4500 --timeout 1200000 --parallel --retries 0 --jobs 20", "test:nuts:destructive": "nyc mocha \"test/nuts/destructive/*.nut.ts\" --slow 4500 --timeout 1200000 --parallel --retries 0 --jobs 20", "test:nuts:manifest": "nyc mocha \"test/nuts/manifest/*.nut.ts\" --slow 4500 --timeout 1200000 --parallel --retries 0 --jobs 20", "test:nuts:retrieve": "nyc mocha \"test/nuts/retrieve/*.nut.ts\" --slow 4500 --timeout 1200000 --parallel --retries 0 --jobs 20", diff --git a/test/nuts/digitalExperienceBundle/constants.ts b/test/nuts/digitalExperienceBundle/constants.ts index 7b956502..93b83730 100644 --- a/test/nuts/digitalExperienceBundle/constants.ts +++ b/test/nuts/digitalExperienceBundle/constants.ts @@ -8,7 +8,7 @@ import { join } from 'node:path'; import { TestSessionOptions } from '@salesforce/cli-plugins-testkit/lib/testSession.js'; import { registry } from '@salesforce/source-deploy-retrieve'; -import { META_XML_SUFFIX } from '@salesforce/source-deploy-retrieve/lib/src/common'; +import { META_XML_SUFFIX } from '@salesforce/source-deploy-retrieve/lib/src/common/constants.js'; import { assert } from 'chai'; export const SOURCE_BASE_RELATIVE_PATH = join('force-app', 'main', 'default'); diff --git a/test/nuts/retrieve/partialBundleDelete.nut.ts b/test/nuts/retrieve/partialBundleDelete.nut.ts index 58af6484..48581af0 100644 --- a/test/nuts/retrieve/partialBundleDelete.nut.ts +++ b/test/nuts/retrieve/partialBundleDelete.nut.ts @@ -6,7 +6,7 @@ */ import * as path from 'node:path'; import * as fs from 'node:fs'; -import * as sinon from 'sinon'; +import sinon from 'sinon'; import { assert, expect } from 'chai'; import { TestSession, TestProject, execCmd } from '@salesforce/cli-plugins-testkit'; import { stubSfCommandUx } from '@salesforce/sf-plugins-core';