Cleanup and cross-plat tmp dir
This commit is contained in:
Родитель
5be0aee32b
Коммит
4e09a72e0a
|
@ -3,10 +3,6 @@ language: node_js
|
|||
node_js:
|
||||
- "7.0"
|
||||
|
||||
before_install:
|
||||
- export DISPLAY=:99.0
|
||||
- sh -e /etc/init.d/xvfb start
|
||||
|
||||
script:
|
||||
- npm run build
|
||||
- npm run build:test
|
||||
|
|
|
@ -30,11 +30,13 @@
|
|||
"@types/mockery": "^1.4.29",
|
||||
"@types/node": "^6.0.41",
|
||||
"@types/source-map": "^0.1.27",
|
||||
"@types/tmp": "0.0.32",
|
||||
"chrome-remote-debug-protocol": "^1.2.20161007",
|
||||
"glob": "^7.1.1",
|
||||
"gulp": "^3.9.1",
|
||||
"mocha": "^3.0.2",
|
||||
"mockery": "^1.7.0",
|
||||
"tmp": "0.0.31",
|
||||
"ts-loader": "^1.0.0",
|
||||
"tslint": "^3.15.1",
|
||||
"typemoq": "^0.3.3",
|
||||
|
@ -48,7 +50,8 @@
|
|||
"build:test": "tsc -p test/tsconfig.json",
|
||||
"watch": "webpack -w",
|
||||
"watch:test": "tsc -p test/tsconfig.json -w",
|
||||
"test": "mocha --timeout 20000 -s 2000 -u tdd --colors --reporter out/test/int/loggingReporter.js './out/test/**/*.test.js'",
|
||||
"test": "mocha --timeout 20000 -s 2000 -u tdd --colors './out/test/*.test.js'",
|
||||
"intTest": "mocha --timeout 20000 -s 2000 -u tdd --colors --reporter out/test/int/loggingReporter.js './out/test/int/*.test.js'",
|
||||
"lint": "tslint -t verbose 'src/**/*.ts' 'test/**/*.ts'",
|
||||
"vscode:prepublish": "gulp verify-no-linked-modules"
|
||||
},
|
||||
|
|
|
@ -9,7 +9,7 @@ import * as path from 'path';
|
|||
import {DebugClient} from 'vscode-debugadapter-testsupport';
|
||||
import {DebugProtocol} from 'vscode-debugprotocol';
|
||||
|
||||
import * as testUtils from './testUtils';
|
||||
import * as testUtils from './intTestUtils';
|
||||
import * as testSetup from './testSetup';
|
||||
|
||||
const DATA_ROOT = testSetup.DATA_ROOT;
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
import * as os from 'os';
|
||||
import * as path from 'path';
|
||||
import * as tmp from 'tmp';
|
||||
|
||||
import {DebugProtocol} from 'vscode-debugprotocol';
|
||||
import {DebugClient} from 'vscode-debugadapter-testsupport';
|
||||
|
@ -66,8 +67,8 @@ function log(e: DebugProtocol.OutputEvent) {
|
|||
function patchLaunchArgFns(): void {
|
||||
function patchLaunchArgs(launchArgs) {
|
||||
launchArgs.verboseDiagnosticLogging = true;
|
||||
launchArgs.userDataDir = `/tmp/chrome-${Math.random()}/`;
|
||||
launchArgs.runtimeExecutable = 'chromium-browser';
|
||||
const tmpDir = tmp.dirSync({ prefix: 'chrome-' });
|
||||
launchArgs.userDataDir = tmpDir.name;
|
||||
}
|
||||
|
||||
const origLaunch = dc.launch;
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
function log() {
|
||||
console.log('Very simple webpage');
|
||||
}
|
||||
|
||||
log();
|
|
@ -0,0 +1,8 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<script src="app.js"></script>
|
||||
<body>
|
||||
<h1>Hello, world!</h1>
|
||||
</body>
|
||||
</html>
|
Загрузка…
Ссылка в новой задаче