From 2d0b2d98edbe593a91f211e888aa482ec4270a19 Mon Sep 17 00:00:00 2001 From: Mykola Mokhnach Date: Tue, 18 Jun 2024 10:18:49 +0200 Subject: [PATCH] chore: Bump chai and chai-as-promised --- package.json | 8 ++------ test/e2e/xcode-specs.js | 17 ++++++++++++----- test/unit/index-specs.js | 13 ++++++++++--- 3 files changed, 24 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index 7d250f5..fc70eec 100644 --- a/package.json +++ b/package.json @@ -62,16 +62,12 @@ "@semantic-release/changelog": "^6.0.1", "@semantic-release/git": "^10.0.1", "@types/bluebird": "^3.5.38", - "@types/chai": "^4.3.5", - "@types/chai-as-promised": "^7.1.5", "@types/lodash": "^4.14.196", "@types/mocha": "^10.0.1", "@types/node": "^20.4.7", - "@types/sinon": "^17.0.0", - "@types/sinon-chai": "^3.2.9", "@types/teen_process": "^2.0.1", - "chai": "^4.1.2", - "chai-as-promised": "^7.1.1", + "chai": "^5.1.1", + "chai-as-promised": "^8.0.0", "conventional-changelog-conventionalcommits": "^8.0.0", "mocha": "^10.0.0", "prettier": "^3.0.0", diff --git a/test/e2e/xcode-specs.js b/test/e2e/xcode-specs.js index 649e6a6..cfa6cc5 100644 --- a/test/e2e/xcode-specs.js +++ b/test/e2e/xcode-specs.js @@ -1,17 +1,24 @@ import * as xcode from '../../lib/xcode'; -import chai from 'chai'; -import chaiAsPromised from 'chai-as-promised'; import { fs, util } from '@appium/support'; import _ from 'lodash'; -let should = chai.should(); -chai.use(chaiAsPromised); - describe('xcode @skip-linux', function () { // on slow machines and busy CI systems these can be slow and flakey this.timeout(30000); + let chai; + let chaiAsPromised; + let should; + + before(async function() { + chai = await import('chai'); + chaiAsPromised = await import('chai-as-promised'); + + should = chai.should(); + chai.use(chaiAsPromised.default); + }); + describe('getPath', function () { it('should get the path to xcode from xcode-select', async function () { const path = await xcode.getPathFromXcodeSelect(); diff --git a/test/unit/index-specs.js b/test/unit/index-specs.js index 4b6e38f..7defd69 100644 --- a/test/unit/index-specs.js +++ b/test/unit/index-specs.js @@ -1,9 +1,16 @@ import xcode from '../../lib/index'; -import chai from 'chai'; - -chai.should(); describe('index', function () { + let chai; + let should; + + before(async function() { + chai = await import('chai'); + + should = chai.should(); + }); + + it('exported objects should exist', function () { xcode.should.exist; });