Skip to content

Commit

Permalink
Merge pull request #4136 from jendrikw/vscode-dummy-test
Browse files Browse the repository at this point in the history
Fix #4109: Add dummy test for vscode
  • Loading branch information
smarter committed Mar 20, 2018
2 parents 67fe08d + 29baa36 commit c52c8ab
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,6 @@ compiler/after-pickling.txt
*.dotty-ide-version

*.decompiled.out

# The vscode app for testing
vscode-dotty/.vscode-test
21 changes: 21 additions & 0 deletions vscode-dotty/test/extension.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//
// Note: This example test is leveraging the Mocha test framework.
// Please refer to their documentation on https://mochajs.org/ for help.
//

// The module 'assert' provides assertion methods from node
import * as assert from 'assert';

// You can import and use all API from the 'vscode' module
// as well as import your extension to test it
import * as vscode from 'vscode';
import * as dotty from '../src/extension';

// Defines a Mocha test suite to group tests of similar kind together
suite("vscode-dotty tests", function () {

// Defines a Mocha unit test
test("dummy test", function() {
assert.equal(1, 1)
});
});
22 changes: 22 additions & 0 deletions vscode-dotty/test/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//
// PLEASE DO NOT MODIFY / DELETE UNLESS YOU KNOW WHAT YOU ARE DOING
//
// This file is providing the test runner to use when running extension tests.
// By default the test runner in use is Mocha based.
//
// You can provide your own test runner if you want to override it by exporting
// a function run(testRoot: string, clb: (error:Error) => void) that the extension
// host can call to run the tests. The test runner is expected to use console.log
// to report the results back to the caller. When the tests are finished, return
// a possible error to the callback or null if none.

import * as testRunner from 'vscode/lib/testrunner';

// You can directly control Mocha options by uncommenting the following lines
// See https://github.com/mochajs/mocha/wiki/Using-mocha-programmatically#set-options for more info
testRunner.configure({
ui: 'tdd', // the TDD UI is being used in extension.test.ts (suite, test, etc.)
useColors: true // colored output from test results
});

module.exports = testRunner;

0 comments on commit c52c8ab

Please sign in to comment.