Skip to content

Commit 2e7c169

Browse files
committed
Move more files to test/unit
1 parent 4afd61c commit 2e7c169

4 files changed

Lines changed: 8 additions & 4 deletions

File tree

test/unit/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ You can run tests inside a browser instance too:
2626
node test\unit\browser\index.js
2727

2828

29+
## Run (with node)
30+
31+
yarn run mocha --run src/vs/editor/test/browser/controller/cursor.test.ts
32+
2933
## Debug
3034

3135
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:

test/unit/node/all.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ function main() {
166166
}
167167

168168
if (process.argv.some(function (a) { return /^--browser/.test(a); })) {
169-
require('../../browser');
169+
require('./browser');
170170
} else {
171171
main();
172172
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const glob = require('glob');
99
const path = require('path');
1010
const fs = require('fs');
1111

12-
const REPO_ROOT = path.join(__dirname, '../');
12+
const REPO_ROOT = path.join(__dirname, '../../../');
1313
const PORT = 8887;
1414

1515
function template(str, env) {
@@ -25,13 +25,13 @@ yaserver.createServer({ rootDir: REPO_ROOT }).then((staticServer) => {
2525
cwd: path.join(REPO_ROOT, 'out'),
2626
// ignore: ['**/test/{node,electron*}/**/*.js']
2727
}, function (err, files) {
28-
if (err) { return res.sendStatus(500); }
28+
if (err) { console.log(err); process.exit(0); }
2929

3030
var modules = files
3131
.map(function (file) { return file.replace(/\.js$/, ''); });
3232

3333
fs.readFile(path.join(__dirname, 'index.html'), 'utf8', function (err, templateString) {
34-
if (err) { return res.sendStatus(500); }
34+
if (err) { console.log(err); process.exit(0); }
3535

3636
res.end(template(templateString, {
3737
modules: JSON.stringify(modules)

0 commit comments

Comments
 (0)