Skip to content

Commit 0e35121

Browse files
committed
style(lint): de-lint some of the test files
- no arrow functions for describe or it - no unused variable names unless prefixed with '_'
1 parent 29ea831 commit 0e35121

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

tests/.jetrc.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,23 @@ module.exports = {
1515
async before(config) {
1616
return config;
1717
},
18-
async after(config) {
18+
async after(_config) {
1919
// no-op
2020
},
2121
},
2222
ios: {
2323
async before(config) {
2424
return config;
2525
},
26-
async after(config) {
26+
async after(_config) {
2727
// no-op
2828
},
2929
},
3030
macos: {
3131
async before(config) {
3232
try {
3333
execSync(`killall "io.invertase.testing"`);
34-
} catch (e) {
34+
} catch (_e) {
3535
// noop
3636
}
3737
const macApp = spawn(
@@ -47,23 +47,26 @@ module.exports = {
4747
}
4848
if (macOsRetries < 3) {
4949
macOsRetries++;
50+
// eslint-disable-next-line no-console
5051
console.log('App crashed, retrying macOS app tests...');
5152
this.before(config);
5253
return;
5354
} else {
55+
// eslint-disable-next-line no-console
5456
console.error('macOS app failed to start, exiting...');
5557
process.exit(1);
5658
}
5759
});
5860
macApp.on('spawn', () => {
61+
// eslint-disable-next-line no-console
5962
console.log('[💻] macOS app started');
6063
});
6164
return config;
6265
},
63-
async after(config) {
66+
async after(_config) {
6467
try {
6568
execSync(`killall "io.invertase.testing"`);
66-
} catch (e) {
69+
} catch (_e) {
6770
// noop
6871
}
6972
},

tests/e2e/firebase.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
*/
1818
const { execSync, spawn } = require('child_process');
1919

20-
describe('Jet Tests', () => {
21-
jest.retryTimes(3, { logErrorsBeforeRetry: true });
20+
describe('Jet Tests', function () {
21+
jest.retryTimes(0, { logErrorsBeforeRetry: true });
2222

23-
it('runs all tests', async () => {
23+
it('runs all tests', async function () {
2424
return new Promise(async (resolve, reject) => {
2525
const platform = detox.device.getPlatform();
2626
const jetProcess = spawn('yarn', ['jet', `--target=${platform}`, '--coverage'], {
@@ -81,7 +81,7 @@ afterAll(async function () {
8181

8282
try {
8383
await device.terminateApp();
84-
} catch (e) {
84+
} catch (_) {
8585
// No-op
8686
}
8787
});

0 commit comments

Comments
 (0)