@digicatapult/sqnc-process-management 2.2.4 → 2.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digicatapult/sqnc-process-management",
3
- "version": "2.2.4",
3
+ "version": "2.2.5",
4
4
  "description": "SQNC Process Management Flow",
5
5
  "main": "./lib/index.js",
6
6
  "bin": {
@@ -37,13 +37,11 @@
37
37
  "homepage": "https://github.com/digicatapult/sqnc-process-management#readme",
38
38
  "devDependencies": {
39
39
  "@types/chai": "^4.3.11",
40
- "@types/chai-as-promised": "^7.1.8",
41
40
  "@types/mocha": "^10.0.6",
42
41
  "@types/node": "^18.19.18",
43
42
  "@typescript-eslint/eslint-plugin": "^7.0.2",
44
43
  "@typescript-eslint/parser": "^7.0.2",
45
- "chai": "^4.4.1",
46
- "chai-as-promised": "^7.1.1",
44
+ "chai": "^5.1.0",
47
45
  "depcheck": "^1.4.7",
48
46
  "eslint": "^8.56.0",
49
47
  "eslint-config-prettier": "^9.1.0",
@@ -7,9 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import { default as chai, expect, assert } from 'chai';
11
- import chaiAsPromised from 'chai-as-promised';
12
- chai.use(chaiAsPromised);
10
+ import { expect } from 'chai';
13
11
  import { createProcess, disableProcess, loadProcesses } from '../../src/lib/process/index.js';
14
12
  import { validAllRestrictions, invalidPOSIX, multiple, simple2, simple, invalidRestrictionKey, invalidRestrictionValue, } from '../fixtures/programs.js';
15
13
  import { Constants } from '../../src/lib/process/constants.js';
@@ -314,14 +312,28 @@ describe('Process creation and deletion, listing', () => {
314
312
  expect(res.error).to.be.instanceOf(ZodError);
315
313
  }));
316
314
  it('fails to disable process that does not exist', () => __awaiter(void 0, void 0, void 0, function* () {
317
- return assert.isRejected(disableProcess('incorrectProcessName', 1, false, polkadotOptions), DisableError);
315
+ let err = null;
316
+ try {
317
+ yield disableProcess('incorrectProcessName', 1, false, polkadotOptions);
318
+ }
319
+ catch (error) {
320
+ err = error;
321
+ }
322
+ expect(err).instanceOf(DisableError);
318
323
  }));
319
324
  it('fails to disable process a second time', () => __awaiter(void 0, void 0, void 0, function* () {
320
325
  const newProcess = yield createProcess({ name: validProcessName, version: validVersionNumber, program: simple }, false, polkadotOptions);
321
326
  expect(newProcess.type).to.equal('ok');
322
327
  const firstDisable = yield disableProcess(validProcessName, validVersionNumber, false, polkadotOptions);
323
328
  expect(firstDisable.type).to.equal('ok');
324
- return assert.isRejected(disableProcess(validProcessName, validVersionNumber, false, polkadotOptions), DisableError);
329
+ let err = null;
330
+ try {
331
+ yield disableProcess(validProcessName, validVersionNumber, false, polkadotOptions);
332
+ }
333
+ catch (error) {
334
+ err = error;
335
+ }
336
+ expect(err).instanceOf(DisableError);
325
337
  }));
326
338
  });
327
339
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digicatapult/sqnc-process-management",
3
- "version": "2.2.4",
3
+ "version": "2.2.5",
4
4
  "description": "SQNC Process Management Flow",
5
5
  "main": "./lib/index.js",
6
6
  "bin": {
@@ -37,13 +37,11 @@
37
37
  "homepage": "https://github.com/digicatapult/sqnc-process-management#readme",
38
38
  "devDependencies": {
39
39
  "@types/chai": "^4.3.11",
40
- "@types/chai-as-promised": "^7.1.8",
41
40
  "@types/mocha": "^10.0.6",
42
41
  "@types/node": "^18.19.18",
43
42
  "@typescript-eslint/eslint-plugin": "^7.0.2",
44
43
  "@typescript-eslint/parser": "^7.0.2",
45
- "chai": "^4.4.1",
46
- "chai-as-promised": "^7.1.1",
44
+ "chai": "^5.1.0",
47
45
  "depcheck": "^1.4.7",
48
46
  "eslint": "^8.56.0",
49
47
  "eslint-config-prettier": "^9.1.0",