Move more files to test/unit
This commit is contained in:
parent
4afd61c29f
commit
2e7c169024
|
@ -26,6 +26,10 @@ You can run tests inside a browser instance too:
|
|||
node test\unit\browser\index.js
|
||||
|
||||
|
||||
## Run (with node)
|
||||
|
||||
yarn run mocha --run src/vs/editor/test/browser/controller/cursor.test.ts
|
||||
|
||||
## Debug
|
||||
|
||||
To debug tests use `--debug` when running the test script. Also, the set of tests can be reduced with the `--run` and `--runGlob` flags. Both require a file path/pattern. Like so:
|
||||
|
|
|
@ -166,7 +166,7 @@ function main() {
|
|||
}
|
||||
|
||||
if (process.argv.some(function (a) { return /^--browser/.test(a); })) {
|
||||
require('../../browser');
|
||||
require('./browser');
|
||||
} else {
|
||||
main();
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ const glob = require('glob');
|
|||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
|
||||
const REPO_ROOT = path.join(__dirname, '../');
|
||||
const REPO_ROOT = path.join(__dirname, '../../../');
|
||||
const PORT = 8887;
|
||||
|
||||
function template(str, env) {
|
||||
|
@ -25,13 +25,13 @@ yaserver.createServer({ rootDir: REPO_ROOT }).then((staticServer) => {
|
|||
cwd: path.join(REPO_ROOT, 'out'),
|
||||
// ignore: ['**/test/{node,electron*}/**/*.js']
|
||||
}, function (err, files) {
|
||||
if (err) { return res.sendStatus(500); }
|
||||
if (err) { console.log(err); process.exit(0); }
|
||||
|
||||
var modules = files
|
||||
.map(function (file) { return file.replace(/\.js$/, ''); });
|
||||
|
||||
fs.readFile(path.join(__dirname, 'index.html'), 'utf8', function (err, templateString) {
|
||||
if (err) { return res.sendStatus(500); }
|
||||
if (err) { console.log(err); process.exit(0); }
|
||||
|
||||
res.end(template(templateString, {
|
||||
modules: JSON.stringify(modules)
|
Loading…
Reference in a new issue