Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
29 changes: 29 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,35 @@
// Mock stubs and disposables use empty function bodies as intentional no-ops.
"@typescript-eslint/no-empty-function": "off"
}
},
{
"files": ["src/test/unit/**/*.ts"],
"rules": {
// Mock objects require any types for flexible test doubles.
"@typescript-eslint/no-explicit-any": "off",
// Mock stubs and disposables use empty function bodies as intentional no-ops.
"@typescript-eslint/no-empty-function": "off",
// Test mocks use Function type for generic callback parameters.
"@typescript-eslint/ban-types": "off",
// Mock properties don't need readonly annotations.
"@typescript-eslint/prefer-readonly": "off",
// Dynamic delete is used in mock client teardown.
"@typescript-eslint/no-dynamic-delete": "off",
// Tests use new for side effects (instantiating classes under test).
"no-new": "off",
// Padded blocks are acceptable in test organization.
"padded-blocks": "off",
// Truthy object checks are used in mock conditionals.
"@typescript-eslint/strict-boolean-expressions": "off",
// Mock registration requires require() before imports.
"@typescript-eslint/no-var-requires": "off",
// Cache setup objects are more readable on one line.
"object-property-newline": "off",
// Unused vars are common in test setup (instantiation triggers side effects).
"@typescript-eslint/no-unused-vars": "off",
// Type assertions used in mock wiring.
"@typescript-eslint/no-unnecessary-type-assertion": "off"
}
}
]
}
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.3.13] - 2026-07-28

### Added
- Support for discovering and running MATLAB unit tests (Addresses [mathworks/MATLAB-extension-for-vscode#138](https://github.com/mathworks/MATLAB-extension-for-vscode/issues/138))
- Support for syntax highlighting in the MATLAB terminal (Addresses [mathworks/MATLAB-extension-for-vscode#295](https://github.com/mathworks/MATLAB-extension-for-vscode/issues/295))

### Fixed
- Resolves an issue that prevents MATLAB workspace data from updating when a `clear` command is followed by a long-running operation, such as `figure`. (Addresses [mathworks/MATLAB-extension-for-vscode#332](https://github.com/mathworks/MATLAB-extension-for-vscode/issues/332))
- Prevents starting the MATLAB language server in untrusted workspaces.
- Resolves an issue with telemetry not being reported when extension settings are changed.

## [1.3.12] - 2026-06-15

### Added
Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ If you have MATLAB R2021b or later installed on your system, you have access to
* Code analysis, such as continuous code checking and automatic fixes
* Code outline
* Symbol renaming
* Test discovery and execution

![MATLAB Extension Demo](public/AdvancedFeatures.gif)

Expand Down Expand Up @@ -84,6 +85,17 @@ When a project is open, Visual Studio Code shows the project name in the status

![MATLAB Projects Screenshot](public/Projects.png)

## Run MATLAB Tests
If you have MATLAB R2021b or later installed on your system, you can run MATLAB unit tests using the Test Explorer in Visual Studio Code. To add tests to the Test Explorer, open the Testing view by selecting the Testing icon in the Activity Bar on the left side of the Visual Studio Code window, and then click **Add Test Folder** or **Add Test File** in the Test Explorer. You also can add tests using the `MATLAB: Add Test Folder` and `MATLAB: Add Test File` commands in the Command Palette.

When you add a test folder, the extension adds all tests in that folder and its subfolders. Tests appear in a hierarchical tree organized by file, test procedure, and parameterization. The test tree updates automatically when test files are modified or when files are added to or removed from your test folders. The extension supports class-based tests (including parameterized tests), function-based tests, and script-based tests.

To run tests, click **Run Test** to the right of a test or test file in the Test Explorer, or click **Run Tests** in the toolbar. Results appear in real time as each test completes, with icons indicating whether the test passed, failed, or remained incomplete. Additionally, as the tests run, test output appears in real time in the Test Results panel.

If a test fails, click the failed test in the Test Explorer to navigate directly to the failing line in your test code and view test diagnostics. Alternatively, click the failed test in the Test Results panel to view diagnostic messages.

![Test Explorer showing test results with passed and failed tests, and diagnostic output in the Test Results panel](public/RunTests.png)

## Run MATLAB in Jupyter Notebooks
You also can use this extension along with the Jupyter Extension for Visual Studio Code to run MATLAB in Jupyter notebooks using Visual Studio Code. For instructions, see [Run MATLAB in Jupyter Notebooks Using VS Code](https://github.com/mathworks/jupyter-matlab-proxy/blob/main/install_guides/vscode/README.md).

Expand Down
Loading
Loading