Skip to content

Commit

Permalink
fix: Update tests for node.js 22.7 (#255)
Browse files Browse the repository at this point in the history
  • Loading branch information
mykola-mokhnach authored Aug 29, 2024
1 parent 9ff3b4e commit 723568b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"lint": "eslint .",
"lint:fix": "npm run lint -- --fix",
"prepare": "npm run build",
"test": "mocha --exit --timeout 1m \"./test/unit/**/*-specs.js\"",
"test": "mocha --exit --timeout 1m \"./test/unit/**/*-specs.*js\"",
"e2e-test": "mocha --exit --timeout 5m \"./test/e2e/**/*-specs.js\""
},
"prettier": {
Expand Down
11 changes: 7 additions & 4 deletions test/unit/simctl-specs.js → test/unit/simctl-specs.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,25 @@ import pq from 'proxyquire';
import sinon from 'sinon';
import * as TeenProcess from 'teen_process';
import _ from 'lodash';
import fs from 'node:fs';

const proxyquire = pq.noCallThru();

const devicePayloads = [
[
{
stdout: JSON.stringify(require(`${__dirname}/fixtures/devices.json`)),
stdout: fs.readFileSync(`${__dirname}/fixtures/devices.json`, 'utf-8'),
},
{
stdout: JSON.stringify(require(`${__dirname}/fixtures/devices-with-unavailable.json`)),
stdout: fs.readFileSync(`${__dirname}/fixtures/devices-with-unavailable.json`, 'utf-8'),
},
],
[
{
stdout: JSON.stringify(require(`${__dirname}/fixtures/devices-simple.json`)),
stdout: fs.readFileSync(`${__dirname}/fixtures/devices-simple.json`, 'utf-8'),
},
{
stdout: JSON.stringify(require(`${__dirname}/fixtures/devices-with-unavailable-simple.json`)),
stdout: fs.readFileSync(`${__dirname}/fixtures/devices-with-unavailable-simple.json`, 'utf-8'),
},
],
];
Expand All @@ -45,6 +47,7 @@ describe('simctl', function () {
chai.use(chaiAsPromised.default);
});


describe('getDevices', function () {
let simctl;

Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "@appium/tsconfig/tsconfig.json",
"compilerOptions": {
"strict": false, // TODO: make this flag true
"strict": false,
"esModuleInterop": true,
"outDir": "build",
"types": ["node"],
"checkJs": true
Expand Down

0 comments on commit 723568b

Please sign in to comment.