File tree 2 files changed +17
-10
lines changed
2 files changed +17
-10
lines changed Original file line number Diff line number Diff line change @@ -147,14 +147,7 @@ jobs:
147
147
run : yarn build:vscode
148
148
149
149
# Our code imports code from VS Code's `out` directory meaning VS Code
150
- # must be built before running these tests. It looks for `out` in order
151
- # to work during development but production creates `out-build`,
152
- # `out-vscode-server, and `out-vscode-server-min` so symlink to one of
153
- # those (during release we move `out-vscode-server-min` to out so using
154
- # that gives the closest environment to release).
155
- - name : Link VS Code build
156
- run : ln -s out-vscode-server-min vendor/modules/code-oss-dev/out
157
-
150
+ # must be built before running these tests.
158
151
# TODO: Move to its own step?
159
152
- name : Run code-server unit tests
160
153
run : yarn test:unit
Original file line number Diff line number Diff line change @@ -3,12 +3,26 @@ set -euo pipefail
3
3
4
4
main () {
5
5
cd " $( dirname " $0 " ) /../.."
6
- cd test/unit/node/test-plugin
6
+
7
+ source ./ci/lib.sh
8
+
9
+ pushd test/unit/node/test-plugin
7
10
make -s out/index.js
11
+ popd
12
+
13
+ # Our code imports from `out` in order to work during development but if you
14
+ # have only built for production you will have not have this directory. In
15
+ # that case symlink `out` to a production build directory.
16
+ local vscode=" vendor/modules/code-oss-dev"
17
+ local link=" $vscode /out"
18
+ local target=" out-build"
19
+ if [[ ! -e $link ]] && [[ -d $vscode /$target ]]; then
20
+ ln -s " $target " " $link "
21
+ fi
22
+
8
23
# We must keep jest in a sub-directory. See ../../test/package.json for more
9
24
# information. We must also run it from the root otherwise coverage will not
10
25
# include our source files.
11
- cd " $OLDPWD "
12
26
CS_DISABLE_PLUGINS=true ./test/node_modules/.bin/jest " $@ "
13
27
}
14
28
You can’t perform that action at this time.
0 commit comments