@unlaxer/tramli-plugins 3.6.1 → 3.6.2

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.
@@ -13,10 +13,14 @@ class ScenarioTestPlugin {
13
13
  */
14
14
  generateCode(definition, framework = 'vitest') {
15
15
  const plan = this.generate(definition);
16
+ const defName = definition.name.replace(/[^a-zA-Z0-9]/g, '_');
16
17
  const lines = [];
17
18
  const imp = framework === 'vitest' ? "import { describe, it, expect } from 'vitest';" : '';
18
19
  if (imp)
19
20
  lines.push(imp);
21
+ lines.push(`// TODO: import or inline your FlowDefinition here`);
22
+ lines.push(`// import { ${defName}Definition } from './your-definitions';`);
23
+ lines.push(`// const definition = ${defName}Definition;`);
20
24
  lines.push('');
21
25
  lines.push(`describe('${definition.name} scenarios', () => {`);
22
26
  for (const scenario of plan.scenarios) {
@@ -10,10 +10,14 @@ export class ScenarioTestPlugin {
10
10
  */
11
11
  generateCode(definition, framework = 'vitest') {
12
12
  const plan = this.generate(definition);
13
+ const defName = definition.name.replace(/[^a-zA-Z0-9]/g, '_');
13
14
  const lines = [];
14
15
  const imp = framework === 'vitest' ? "import { describe, it, expect } from 'vitest';" : '';
15
16
  if (imp)
16
17
  lines.push(imp);
18
+ lines.push(`// TODO: import or inline your FlowDefinition here`);
19
+ lines.push(`// import { ${defName}Definition } from './your-definitions';`);
20
+ lines.push(`// const definition = ${defName}Definition;`);
17
21
  lines.push('');
18
22
  lines.push(`describe('${definition.name} scenarios', () => {`);
19
23
  for (const scenario of plan.scenarios) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unlaxer/tramli-plugins",
3
- "version": "3.6.1",
3
+ "version": "3.6.2",
4
4
  "description": "Plugin pack for tramli — audit, eventstore, observability, resume, idempotency, hierarchy, diagram, docs, lint, testing, subflow",
5
5
  "type": "module",
6
6
  "exports": {