Skip to content

Commit

Permalink
init test
Browse files Browse the repository at this point in the history
  • Loading branch information
clinyong committed Feb 2, 2017
1 parent 5d53665 commit 1305150
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 2 deletions.
4 changes: 4 additions & 0 deletions test/fixtures/sample.css
@@ -0,0 +1,4 @@
.container {}
.header{}
.body {}
.footer {}
2 changes: 2 additions & 0 deletions test/fixtures/sample.tsx
@@ -0,0 +1,2 @@
const styles = require("./sample.css");
console.log(styles.body);
22 changes: 22 additions & 0 deletions test/index.ts
@@ -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.

let testRunner = require("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;
5 changes: 3 additions & 2 deletions tsconfig.json
Expand Up @@ -10,6 +10,7 @@
"rootDir": "."
},
"include": [
"src/**/*.ts"
"src/**/*.ts",
"test/**/*.ts"
]
}
}

0 comments on commit 1305150

Please sign in to comment.