Skip to content

Commit 2270649

Browse files
committed
Meta tweaks
1 parent de2e1bc commit 2270649

File tree

5 files changed

+18
-11
lines changed

5 files changed

+18
-11
lines changed

.gitattributes

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
* text=auto
2-
*.js text eol=lf
1+
* text=auto eol=lf

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
os: osx
22
language: node_js
33
node_js:
4-
- 'node'
4+
- '10'

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@
3333
"await"
3434
],
3535
"devDependencies": {
36-
"ava": "*",
37-
"electron": "^1.8.4",
38-
"execa": "^0.10.0",
39-
"spectron": "^3.8.0",
40-
"xo": "*"
36+
"ava": "^1.0.1",
37+
"electron": "^4.0.0",
38+
"execa": "^1.0.0",
39+
"spectron": "^5.0.0",
40+
"xo": "^0.23.0"
4141
},
4242
"xo": {
4343
"envs": [

test/fixture/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
const electron = require('electron');
33
const ipc = require('../..');
44

5+
process.env.ELECTRON_DISABLE_SECURITY_WARNINGS = true;
6+
57
ipc.answerRenderer('test', async data => {
68
console.log('test:main:data-from-renderer:', data);
79
return 'test:main:answer';

test/fixture/test.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,19 @@ test('main', async t => {
2323
app.client.getRenderProcessLogs()
2424
]);
2525

26-
const logs = [
26+
let logs = [
2727
...mainLogs,
2828
// TODO: We have to clean the message because of:
2929
// https://github.com/electron/spectron/issues/283
3030
...rendererLogs.map(x => x.message.replace(/[^"]+/, ''))
31-
];
32-
logs.sort();
31+
].sort();
32+
33+
// More useless cleanup because Spectron sucks
34+
logs = logs.filter(x =>
35+
!x.startsWith('DevTools listening') &&
36+
!/^\[.*:CONSOLE\(\d\)\]/.test(x) &&
37+
x !== ''
38+
);
3339

3440
t.deepEqual(logs, [
3541
// TODO: The value is missing as Spectron only captures the first argument to `console.log`:

0 commit comments

Comments
 (0)