Skip to content

Commit 6235567

Browse files
authored
Multi os tests (#139)
* ADDED: Windows & Mac Travis tests Windows build is allowed to fail: right now Cypress installation doesn't work yet on this OS.
1 parent 60bf2f0 commit 6235567

File tree

5 files changed

+189
-24
lines changed

5 files changed

+189
-24
lines changed

.travis.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
os:
2+
- mac
3+
- linux
4+
- windows
5+
jobs:
6+
allow_failures:
7+
- os: windows
18
language: node_js
29
node_js:
310
- 11.10.1
@@ -7,6 +14,14 @@ addons:
714
apt:
815
packages:
916
- libgconf-2-4
17+
before_install:
18+
- |-
19+
case $TRAVIS_OS_NAME in
20+
windows)
21+
set NODE_OPTIONS=
22+
;;
23+
esac
24+
1025
install:
1126
- npm ci
1227
- cd e2e && npm ci && npm run build

e2e/package-lock.json

Lines changed: 164 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

e2e/package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
"scripts": {
77
"build": "webpack --config ./webpack.config.e2e.js",
88
"watch": "webpack --config ./webpack.config.e2e.js --watch",
9-
"server-old": "ws -d ./build-e2e -p 8080",
10-
"server": "pm2 start \"npx ws -d ./build-e2e -p 8080\" --name cy-server",
9+
"server": "npm run start-server && npm run wait-server",
10+
"start-server": "pm2 start --name cy-server node_modules/local-web-server/bin/cli.js -- -p 8080 -d ./build-e2e",
11+
"wait-server": "wait-on http://localhost:8080",
1112
"cypress:open": "cypress open",
1213
"cypress:run": "cypress run --config video=false"
1314
},
@@ -25,6 +26,7 @@
2526
},
2627
"devDependencies": {
2728
"cypress": "^3.5.0",
28-
"pm2": "^4.1.2"
29+
"pm2": "^4.1.2",
30+
"wait-on": "^4.0.2"
2931
}
30-
}
32+
}

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@
2929
},
3030
"scripts": {
3131
"test": "jest",
32-
"test:e2e": "npm run server:stop && cd e2e && npm run build && npm run server & wait-on http://localhost:8080 && cd e2e && npm run cypress:run --config video=false && pm2 stop cy-server",
32+
"test:e2e": "npm run server:stop && cd e2e && npm run build && npm run server && npm run cypress:run --config video=false && pm2 stop cy-server",
3333
"test:all": "npm run test:e2e && npm run test",
3434
"build": "webpack --watch",
3535
"server": "pm2 start \"npx ws -d ./build-e2e -p 8080\" --name cy-server",
36-
"server:stop": "pm2 --silent stop cy-server || true",
36+
"server:stop": "pm2 --silent stop cy-server || true",
3737
"ftpd": "ftp-srv ftp://0.0.0.0:9876 --root /tmp/react-explorer -c ./credentials.json",
3838
"dist": "webpack --config webpack.config.production.js && electron-builder -mwl",
3939
"dist-win": "webpack --config webpack.config.production.js && electron-builder -w",
@@ -115,4 +115,4 @@
115115
"react-i18next": "^8.4.0",
116116
"react-virtualized": "^9.21.1"
117117
}
118-
}
118+
}

src/services/plugins/__tests__/FsLocal.test.ts

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -393,22 +393,6 @@ describe('FsLocal', () => {
393393

394394
afterAll(() => mock.restore());
395395

396-
// - "atime": 2020-04-19T16:54:07.529Z,
397-
// - "atimeMs": 1587315247529,
398-
// - "birthtime": 2020-04-19T16:54:07.529Z,
399-
// - "birthtimeMs": 1587315247529,
400-
// - "blksize": 4096,
401-
// - "blocks": 0,
402-
// - "ctime": 2020-04-19T16:54:07.529Z,
403-
// - "ctimeMs": 1587315247529,
404-
// - "gid": 1140567832,
405-
// - "mtime": 2020-04-19T16:54:07.529Z,
406-
// - "mtimeMs": 1587315247529,
407-
// - "nlink": 1,
408-
// - "rdev": 0,
409-
// - "size": 0,
410-
// - "uid": 138850138,
411-
412396
it('should return stat for existing file', async () => {
413397
const path = `${TESTS_DIR}/file`;
414398
expect.assertions(1);
@@ -421,7 +405,7 @@ describe('FsLocal', () => {
421405
name: 'file',
422406
extension: '',
423407
cDate: fsStat.ctime,
424-
bDate: fsStat.ctime,
408+
bDate: fsStat.birthtime,
425409
mDate: fsStat.mtime,
426410
length: fsStat.size,
427411
isDir: false,

0 commit comments

Comments
 (0)