Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ jobs:
run: npm ci
# We'll need to install the CLI tool, since some of the tests
# are integration tests.

- name: 'Compile extension'
run: npm run build

- name: Install SF CLI
run: npm install --global @salesforce/cli
# We'll need to install Salesforce Code Analyzer, since some
Expand Down
17 changes: 0 additions & 17 deletions .vscode-test.mjs

This file was deleted.

13 changes: 0 additions & 13 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,6 @@
"${workspaceFolder}/out/**/*.js"
],
"preLaunchTask": "${defaultBuildTask}"
},
{
"name": "Extension Tests",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test/legacy/index"
],
"outFiles": [
"${workspaceFolder}/out/test/**/*.js"
],
"preLaunchTask": "${defaultBuildTask}"
}
]
}
5 changes: 3 additions & 2 deletions .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,21 @@
.idea/**
.nyc_output/**
.sfdx
.vscode-test/**
.vscode/**
CODEOWNERS
coverage/**
end-to-end/**
esbuild.js
github-actions/**
node_modules/**
out/**
!out/extension.js
scripts/**
src/**
templates/**
test/**
**/*.map
**/*.ts
**/.vscode-test.*
**/eslint.config.mjs
**/tsconfig.json
**/jest.config.mjs
2 changes: 1 addition & 1 deletion SHA256.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ make sure that their SHA values match the values in the list below.
shasum -a 256 <location_of_the_downloaded_file>

3. Confirm that the SHA in your output matches the value in this list of SHAs.
788e642e64081d15b52d4b68e6414ca32d519ae0d16dc2100c742ca9069ddec3 ./extensions/sfdx-code-analyzer-vscode-1.11.0.vsix
86a417c38f40fec2f21bcafb12f418e0b982b2bf037181f7596797d6e5ae0bf7 ./extensions/sfdx-code-analyzer-vscode-1.12.0.vsix
4. Change the filename extension for the file that you downloaded from .zip to
.vsix.

Expand Down
51 changes: 51 additions & 0 deletions end-to-end/.vscode-test.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import * as fs from 'node:fs';
import * as os from 'node:os';
import * as path from 'node:path';
import { defineConfig } from '@vscode/test-cli';

const extensionsDir = path.resolve(import.meta.dirname, '.vscode-test', 'extensions');
fs.mkdirSync(extensionsDir, { recursive: true });

const tempDir = fs.mkdtempSync(path.join(os.tmpdir(),'sfca-'));

export default defineConfig({
/**
* A file or list of files in which to find tests. Non-absolute paths will
* be treated as glob expressions relative to the location of
* the `.vscode-test.js` file.
*/
files: 'out/**/*.test.js',

/**
* Defines extension directories to load during tests. Defaults to the directory
* of the `.vscode-test.js` file. Must include a `package.json` Extension Manifest.
*/
extensionDevelopmentPath: path.resolve(import.meta.dirname, '..'),

/**
* Path to a folder or workspace file that should be opened.
*/
workspaceFolder: path.resolve(import.meta.dirname, 'sampleWorkspace'),

/**
* A list of vscode extensions to install prior to running the tests.
* Can be specified as 'owner.extension', '[email protected]',
* 'owner.extension@prerelease', or the path to a vsix file (/path/to/extension.vsix)
*/
installExtensions: ['salesforce.salesforcedx-vscode-core'],

/**
* A list of launch arguments passed to VS Code executable, in addition to `--extensionDevelopmentPath`
* and `--extensionTestsPath` which are provided by `extensionDevelopmentPath` and `extensionTestsPath`
* options.
*
* If the first argument is a path to a file/folder/workspace, the launched VS Code instance
* will open it.
*
* See `code --help` for possible arguments.
*/
launchArgs: [
`--extensions-dir=${extensionsDir}`,
`--user-data-dir=${tempDir}`
]
});
Loading