harmonyc 0.12.0 → 0.12.1

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.
@@ -60,14 +60,15 @@ export class VitestGenerator {
60
60
  this.tf.print('});');
61
61
  }
62
62
  errorStep(action, errorResponse) {
63
- var _a;
64
63
  this.declareFeatureVariables([action]);
65
64
  this.tf.print(`context.task.meta.phrases.push(${str(errorResponse.toSingleLineString())});`);
66
65
  this.tf.print(`await expect(async () => {`);
67
66
  this.tf.indent(() => {
68
67
  action.toCode(this);
69
68
  });
70
- this.tf.print(`}).rejects.toThrow(${(_a = errorResponse === null || errorResponse === void 0 ? void 0 : errorResponse.toCode(this)) !== null && _a !== void 0 ? _a : ''});`);
69
+ this.tf.print(`}).rejects.toThrow(${(errorResponse === null || errorResponse === void 0 ? void 0 : errorResponse.message) !== undefined
70
+ ? str(errorResponse.message.text)
71
+ : ''});`);
71
72
  }
72
73
  step(action, responses) {
73
74
  this.declareFeatureVariables([action, ...responses]);
package/model/model.js CHANGED
@@ -281,6 +281,9 @@ export class ErrorResponse extends Response {
281
281
  super(message ? [new DummyKeyword('!!'), message] : [new DummyKeyword('!!')]);
282
282
  this.message = message;
283
283
  }
284
+ toCode(cg) {
285
+ cg.errorStep;
286
+ }
284
287
  }
285
288
  export class SetVariable extends Action {
286
289
  constructor(variableName, value) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "harmonyc",
3
3
  "description": "Harmony Code - model-driven BDD for Vitest",
4
- "version": "0.12.0",
4
+ "version": "0.12.1",
5
5
  "author": "Bernát Kalló",
6
6
  "type": "module",
7
7
  "bin": {