File tree Expand file tree Collapse file tree 3 files changed +34
-2
lines changed Expand file tree Collapse file tree 3 files changed +34
-2
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,13 @@ services:
7
7
- ${SERVER_HOST:-127.0.0.1}:${SERVER_PORT-}:80
8
8
volumes :
9
9
- .:/var/www/html
10
+ mocha :
11
+ build : test
12
+ command : http://example/test
13
+ volumes :
14
+ - .:/var/www/html
15
+ depends_on :
16
+ - example
10
17
chromedriver :
11
18
image : blueimp/chromedriver
12
19
init : true
Original file line number Diff line number Diff line change 86
86
},
87
87
"scripts" : {
88
88
"lint" : " stylelint '**/*.css' && eslint ." ,
89
- "preunit" : " docker-compose up -d example" ,
90
- "unit" : " mocha-chrome http://localhost/test" ,
89
+ "unit" : " docker-compose run --rm mocha" ,
91
90
"wdio" : " docker-compose run --rm wdio" ,
92
91
"test" : " npm run lint && npm run unit && npm run wdio && npm run wdio -- firefox" ,
93
92
"posttest" : " docker-compose down -v" ,
Original file line number Diff line number Diff line change
1
+ FROM blueimp/chromedriver
2
+
3
+ USER root
4
+
5
+ RUN export DEBIAN_FRONTEND=noninteractive \
6
+ && apt-get update \
7
+ && apt-get install --no-install-recommends --no-install-suggests -y \
8
+ nodejs \
9
+ npm \
10
+ # Remove obsolete files:
11
+ && npm install -g \
12
+ npm@latest \
13
+ mocha-chrome \
14
+ && apt-get clean \
15
+ && rm -rf \
16
+ /tmp/* \
17
+ /usr/share/doc/* \
18
+ /var/cache/* \
19
+ /var/lib/apt/lists/* \
20
+ /var/tmp/*
21
+
22
+ USER webdriver
23
+
24
+ WORKDIR /var/www/html
25
+
26
+ ENTRYPOINT ["mocha-chrome" ]
You can’t perform that action at this time.
0 commit comments