Skip to content

Commit 8a73c7d

Browse files
committed
renames: test -> test-mocha and test-electron -> test
1 parent e2d30cc commit 8a73c7d

6 files changed

Lines changed: 25 additions & 27 deletions

File tree

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ script:
4444
- gulp electron --silent
4545
- gulp compile --silent --max_old_space_size=4096
4646
- gulp optimize-vscode --silent --max_old_space_size=4096
47-
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./scripts/test.sh --reporter dot --coverage; else ./scripts/test.sh --reporter dot; fi
48-
- ./scripts/test-electron.sh
47+
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./scripts/test.sh --coverage; else ./scripts/test.sh; fi
4948
- ./scripts/test-integration.sh
5049

5150
after_success:

appveyor.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,4 @@ test_script:
1616
- node --version
1717
- npm --version
1818
- .\scripts\test.bat
19-
- .\scripts\test-electron.bat
2019
- .\scripts\test-integration.bat
Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@echo off
22
setlocal
33

4-
set ELECTRON_RUN_AS_NODE=
4+
set ELECTRON_RUN_AS_NODE=1
55

66
pushd %~dp0\..
77

@@ -10,10 +10,16 @@ set NAMESHORT=%NAMESHORT: "=%
1010
set NAMESHORT=%NAMESHORT:"=%.exe
1111
set CODE=".build\electron\%NAMESHORT%"
1212

13-
rem Run tests in electron
14-
%CODE% .\test\electron\index.js %*
13+
rem TFS Builds
14+
if not "%BUILD_BUILDID%" == "" (
15+
%CODE% .\node_modules\mocha\bin\_mocha %*
16+
)
1517

18+
rem Otherwise
19+
if "%BUILD_BUILDID%" == "" (
20+
%CODE% .\node_modules\mocha\bin\_mocha --reporter dot %*
21+
)
1622
popd
1723

1824
endlocal
19-
exit /b %errorlevel%
25+
exit /b %errorlevel%
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ test -d node_modules || ./scripts/npm.sh install
2828

2929
# Build
3030
test -d out || ./node_modules/.bin/gulp compile
31-
echo "code $CODE"
31+
3232
# Unit Tests
3333
export VSCODE_DEV=1
3434
if [[ "$OSTYPE" == "darwin"* ]]; then
35-
cd $ROOT ; ulimit -n 4096 ; \
35+
cd $ROOT ; ulimit -n 4096 ; ELECTRON_RUN_AS_NODE=1 \
3636
"$CODE" \
37-
test/electron/index.js "$@"
37+
node_modules/mocha/bin/_mocha "$@"
3838
else
39-
cd $ROOT ; \
39+
cd $ROOT ; ELECTRON_RUN_AS_NODE=1 \
4040
"$CODE" \
41-
test/electron/index.js "$@"
41+
node_modules/mocha/bin/_mocha "$@"
4242
fi

scripts/test.bat

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@echo off
22
setlocal
33

4-
set ELECTRON_RUN_AS_NODE=1
4+
set ELECTRON_RUN_AS_NODE=
55

66
pushd %~dp0\..
77

@@ -10,16 +10,10 @@ set NAMESHORT=%NAMESHORT: "=%
1010
set NAMESHORT=%NAMESHORT:"=%.exe
1111
set CODE=".build\electron\%NAMESHORT%"
1212

13-
rem TFS Builds
14-
if not "%BUILD_BUILDID%" == "" (
15-
%CODE% .\node_modules\mocha\bin\_mocha %*
16-
)
13+
rem Run tests in electron
14+
%CODE% .\test\electron\index.js %*
1715

18-
rem Otherwise
19-
if "%BUILD_BUILDID%" == "" (
20-
%CODE% .\node_modules\mocha\bin\_mocha --reporter dot %*
21-
)
2216
popd
2317

2418
endlocal
25-
exit /b %errorlevel%
19+
exit /b %errorlevel%

scripts/test.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ test -d node_modules || ./scripts/npm.sh install
2828

2929
# Build
3030
test -d out || ./node_modules/.bin/gulp compile
31-
31+
echo "code $CODE"
3232
# Unit Tests
3333
export VSCODE_DEV=1
3434
if [[ "$OSTYPE" == "darwin"* ]]; then
35-
cd $ROOT ; ulimit -n 4096 ; ELECTRON_RUN_AS_NODE=1 \
35+
cd $ROOT ; ulimit -n 4096 ; \
3636
"$CODE" \
37-
node_modules/mocha/bin/_mocha "$@"
37+
test/electron/index.js "$@"
3838
else
39-
cd $ROOT ; ELECTRON_RUN_AS_NODE=1 \
39+
cd $ROOT ; \
4040
"$CODE" \
41-
node_modules/mocha/bin/_mocha "$@"
41+
test/electron/index.js "$@"
4242
fi

0 commit comments

Comments
 (0)