@hg-ts/tests 0.5.18 → 0.5.19

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.
@@ -9,11 +9,11 @@ export function ExpectException(error) {
9
9
  catch (err) {
10
10
  isThrowError = true;
11
11
  if (error) {
12
- expect(err).toBeInstanceOf(error);
12
+ expect(err, 'Expected exception type').toBeInstanceOf(error);
13
13
  }
14
14
  }
15
15
  finally {
16
- expect(isThrowError).toBeTruthy();
16
+ expect(isThrowError, 'An exception is expected').toBeTruthy();
17
17
  }
18
18
  });
19
19
  }
@@ -1 +1 @@
1
- {"version":3,"file":"expect-error.decorator.js","sourceRoot":"","sources":["../../src/decorators/expect-error.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEzD,MAAM,UAAU,eAAe,CAAC,KAA4B;IAC3D,OAAO,mBAAmB,CAAC,KAAK,EAAC,MAA2B,EAAE,EAAE;QAC/D,IAAI,YAAY,GAAG,KAAK,CAAC;QAEzB,IAAI,CAAC;YACJ,MAAM,MAAM,EAAE,CAAC;QAChB,CAAC;QAAC,OAAO,GAAY,EAAE,CAAC;YACvB,YAAY,GAAG,IAAI,CAAC;YAEpB,IAAI,KAAK,EAAE,CAAC;gBACX,MAAM,CAAC,GAAG,CAAC,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;YACnC,CAAC;QACF,CAAC;gBAAS,CAAC;YACV,MAAM,CAAC,YAAY,CAAC,CAAC,UAAU,EAAE,CAAC;QACnC,CAAC;IACF,CAAC,CAAC,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"expect-error.decorator.js","sourceRoot":"","sources":["../../src/decorators/expect-error.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEzD,MAAM,UAAU,eAAe,CAAC,KAA4B;IAC3D,OAAO,mBAAmB,CAAC,KAAK,EAAC,MAA2B,EAAE,EAAE;QAC/D,IAAI,YAAY,GAAG,KAAK,CAAC;QAEzB,IAAI,CAAC;YACJ,MAAM,MAAM,EAAE,CAAC;QAChB,CAAC;QAAC,OAAO,GAAY,EAAE,CAAC;YACvB,YAAY,GAAG,IAAI,CAAC;YAEpB,IAAI,KAAK,EAAE,CAAC;gBACX,MAAM,CAAC,GAAG,EAAE,yBAAyB,CAAC,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;YAC9D,CAAC;QACF,CAAC;gBAAS,CAAC;YACV,MAAM,CAAC,YAAY,EAAE,0BAA0B,CAAC,CAAC,UAAU,EAAE,CAAC;QAC/D,CAAC;IACF,CAAC,CAAC,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hg-ts/tests",
3
- "version": "0.5.18",
3
+ "version": "0.5.19",
4
4
  "main": "dist/index.js",
5
5
  "type": "module",
6
6
  "exports": {
@@ -24,9 +24,9 @@
24
24
  "unplugin-swc": "1.5.9"
25
25
  },
26
26
  "devDependencies": {
27
- "@hg-ts-config/typescript": "0.5.18",
28
- "@hg-ts/linter": "0.5.18",
29
- "@hg-ts/types": "0.5.18",
27
+ "@hg-ts-config/typescript": "0.5.19",
28
+ "@hg-ts/linter": "0.5.19",
29
+ "@hg-ts/types": "0.5.19",
30
30
  "@types/node": "22.19.1",
31
31
  "@vitest/coverage-v8": "4.0.14",
32
32
  "eslint": "9.18.0",
@@ -11,10 +11,10 @@ export function ExpectException(error?: AnyCLass<any, any[]>): MethodDecorator {
11
11
  isThrowError = true;
12
12
 
13
13
  if (error) {
14
- expect(err).toBeInstanceOf(error);
14
+ expect(err, 'Expected exception type').toBeInstanceOf(error);
15
15
  }
16
16
  } finally {
17
- expect(isThrowError).toBeTruthy();
17
+ expect(isThrowError, 'An exception is expected').toBeTruthy();
18
18
  }
19
19
  });
20
20
  }