Skip to content

Commit c52c8ab

Browse files
authored
Merge pull request #4136 from jendrikw/vscode-dummy-test
Fix #4109: Add dummy test for vscode
2 parents 67fe08d + 29baa36 commit c52c8ab

File tree

3 files changed

+46
-0
lines changed

3 files changed

+46
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,6 @@ compiler/after-pickling.txt
7373
*.dotty-ide-version
7474

7575
*.decompiled.out
76+
77+
# The vscode app for testing
78+
vscode-dotty/.vscode-test

vscode-dotty/test/extension.test.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
//
2+
// Note: This example test is leveraging the Mocha test framework.
3+
// Please refer to their documentation on https://mochajs.org/ for help.
4+
//
5+
6+
// The module 'assert' provides assertion methods from node
7+
import * as assert from 'assert';
8+
9+
// You can import and use all API from the 'vscode' module
10+
// as well as import your extension to test it
11+
import * as vscode from 'vscode';
12+
import * as dotty from '../src/extension';
13+
14+
// Defines a Mocha test suite to group tests of similar kind together
15+
suite("vscode-dotty tests", function () {
16+
17+
// Defines a Mocha unit test
18+
test("dummy test", function() {
19+
assert.equal(1, 1)
20+
});
21+
});

vscode-dotty/test/index.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
//
2+
// PLEASE DO NOT MODIFY / DELETE UNLESS YOU KNOW WHAT YOU ARE DOING
3+
//
4+
// This file is providing the test runner to use when running extension tests.
5+
// By default the test runner in use is Mocha based.
6+
//
7+
// You can provide your own test runner if you want to override it by exporting
8+
// a function run(testRoot: string, clb: (error:Error) => void) that the extension
9+
// host can call to run the tests. The test runner is expected to use console.log
10+
// to report the results back to the caller. When the tests are finished, return
11+
// a possible error to the callback or null if none.
12+
13+
import * as testRunner from 'vscode/lib/testrunner';
14+
15+
// You can directly control Mocha options by uncommenting the following lines
16+
// See https://github.com/mochajs/mocha/wiki/Using-mocha-programmatically#set-options for more info
17+
testRunner.configure({
18+
ui: 'tdd', // the TDD UI is being used in extension.test.ts (suite, test, etc.)
19+
useColors: true // colored output from test results
20+
});
21+
22+
module.exports = testRunner;

0 commit comments

Comments
 (0)