-
Notifications
You must be signed in to change notification settings - Fork 6
Improve testing support #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,18 +1,25 @@ | ||
| import { defineConfig } from '@vscode/test-cli'; | ||
|
|
||
| export default defineConfig({ | ||
| const baseConfig = { | ||
| platform: 'desktop', | ||
| version: '1.92.2', | ||
| files: 'out/**/*.test.js', | ||
| // CI environments don't have a monorepo. | ||
| workspaceFolder: './', | ||
| mocha: { | ||
| // Longer timeout because this will download Magic + the SDK. | ||
| timeout: 5 * 60 * 1000, | ||
| reporter: 'out/test/reporter.js', | ||
| }, | ||
| env: { | ||
| // Force magic download. | ||
| MOJO_EXTENSION_FORCE_MAGIC: '1', | ||
| }; | ||
|
|
||
| export default defineConfig([ | ||
| { | ||
| ...baseConfig, | ||
| label: 'default', | ||
| workspaceFolder: './', | ||
| files: 'out/**/*.test.default.js', | ||
| }, | ||
| { | ||
| ...baseConfig, | ||
| label: 'pixi', | ||
| workspaceFolder: 'fixtures/pixi-workspace/', | ||
| files: 'out/**/*.test.pixi.js', | ||
| }, | ||
| }); | ||
| ]); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| //===----------------------------------------------------------------------===// | ||
| // | ||
| // This file is Modular Inc proprietary. | ||
| // | ||
| //===----------------------------------------------------------------------===// | ||
|
|
||
| import * as assert from 'assert'; | ||
| import * as vscode from 'vscode'; | ||
| import { extension } from './extension'; | ||
| import { SDKKind } from './pyenv'; | ||
|
|
||
| suite('pyenv', function () { | ||
| test('should detect Pixi environments', async function () { | ||
| await vscode.commands.executeCommand('mojo.extension.restart'); | ||
| const sdk = await extension.pyenvManager!.getActiveSDK(); | ||
| assert.ok(sdk); | ||
| assert.strictEqual(sdk.kind, SDKKind.Environment); | ||
| assert.strictEqual(sdk.version, '25.5.0.dev2025071605'); | ||
| }); | ||
| }); | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -86,7 +86,7 @@ class VsCodeReporter extends Base { | |||||
| }); | ||||||
|
|
||||||
| runner.on(EVENT_TEST_PENDING, (test: Test) => { | ||||||
| console.log(indent(`${Base.color('pending', test.title)}`)); | ||||||
| console.log(indent(Base.color('pending', `- ${test.title}`))); | ||||||
|
||||||
| console.log(indent(Base.color('pending', `- ${test.title}`))); | |
| console.log(indent(Base.color('pending', formatTestTitle('pending', test.title)))); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| # SCM syntax highlighting & preventing 3-way merges | ||
| pixi.lock merge=binary linguist-language=YAML linguist-generated=true |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| # pixi environments | ||
| .pixi |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| fn main(): | ||
| print("hello world") |
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,11 @@ | ||||||
| [workspace] | ||||||
| authors = ["Lily Brown <lbrown@modular.com>"] | ||||||
| channels = ["https://conda.modular.com/max-nightly", "conda-forge"] | ||||||
| name = "pixi-workspace" | ||||||
| platforms = ["linux-64"] | ||||||
| version = "0.1.0" | ||||||
|
|
||||||
| [tasks] | ||||||
|
|
||||||
| [dependencies] | ||||||
| modular = "25.5.0.dev2025071605" | ||||||
|
||||||
| modular = "25.5.0.dev2025071605" | |
| modular = "25.5.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test hardcodes the expected version string. This creates a tight coupling between the test and the fixture configuration, making maintenance difficult when updating versions.