Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Bump chai and chai-as-promised #433

Merged
merged 1 commit into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,15 @@
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@types/bluebird": "^3.5.42",
"@types/chai": "^4.3.11",
"@types/chai-as-promised": "^7.1.8",
"@types/lodash": "^4.14.202",
"@types/mocha": "^10.0.6",
"@types/node": "^20.10.4",
"@types/shell-quote": "^1.7.5",
"@types/sinon": "^17.0.2",
"@types/source-map-support": "^0.x",
"@types/ws": "^8.5.10",
"chai": "^4.3.10",
"chai-as-promised": "^7.1.1",
"chai": "^5.1.1",
"chai-as-promised": "^8.0.0",
"conventional-changelog-conventionalcommits": "^8.0.0",
"mocha": "^10.2.0",
"prettier": "^3.1.0",
Expand Down
17 changes: 12 additions & 5 deletions test/exec-specs.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
import path from 'path';
import { exec } from '../lib';
import chai from 'chai';
import chaiAsPromised from 'chai-as-promised';
import { getFixture } from './helpers';
import _ from 'lodash';


const should = chai.should();
chai.use(chaiAsPromised);

describe('exec', function () {
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);
});

it('should work with arguments like spawn', async function () {
let cmd = 'ls';
let args = [__dirname];
Expand Down
17 changes: 12 additions & 5 deletions test/subproc-specs.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
import B from 'bluebird';
import path from 'path';
import {exec, SubProcess} from '../lib';
import chai from 'chai';
import chaiAsPromised from 'chai-as-promised';
import {getFixture} from './helpers';

const should = chai.should();
chai.use(chaiAsPromised);

// Windows doesn't understand SIGHUP
const stopSignal = process.platform === 'win32' ? 'SIGTERM' : 'SIGHUP';

describe('SubProcess', function () {
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);
});

it('should throw an error if initialized without a command', function () {
should.throw(() => {
// @ts-expect-error
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"compilerOptions": {
"outDir": "build",
"checkJs": true,
"types": ["node", "mocha", "chai", "chai-as-promised", "sinon"]
"types": ["node", "mocha"]
},
"include": ["./lib/**/*", "./test/**/*"],
"exclude": ["test/fixtures/**/*"]
Expand Down
Loading