From 0fab7cecb2047ac10c99940d48f62c3f7940fab0 Mon Sep 17 00:00:00 2001 From: Maciej Barelkowski Date: Tue, 10 Oct 2023 11:44:28 +0200 Subject: [PATCH] chore: lint --- .../fixtures/camunda-execution-listener.js | 2 + ...-execution-listener-implementation-type.js | 92 +++++++++---------- .../test/spec/validationSpec.js | 2 +- 3 files changed, 49 insertions(+), 47 deletions(-) diff --git a/packages/element-templates-json-schema/test/fixtures/camunda-execution-listener.js b/packages/element-templates-json-schema/test/fixtures/camunda-execution-listener.js index b50eadc..4f21b48 100644 --- a/packages/element-templates-json-schema/test/fixtures/camunda-execution-listener.js +++ b/packages/element-templates-json-schema/test/fixtures/camunda-execution-listener.js @@ -42,6 +42,7 @@ export const template = { 'scriptFormat': 'js' } }, + // For backwards compatibility support missing attributes as well { 'label': 'bar5', @@ -49,6 +50,7 @@ export const template = { 'type': 'camunda:executionListener' } }, + // For backwards compatibility support scriptFormat only { 'label': 'bar5', diff --git a/packages/element-templates-json-schema/test/fixtures/invalid-execution-listener-implementation-type.js b/packages/element-templates-json-schema/test/fixtures/invalid-execution-listener-implementation-type.js index e872c38..d2d929b 100644 --- a/packages/element-templates-json-schema/test/fixtures/invalid-execution-listener-implementation-type.js +++ b/packages/element-templates-json-schema/test/fixtures/invalid-execution-listener-implementation-type.js @@ -32,106 +32,106 @@ export const template = { export const errors = [ { - dataPath: "/properties/0/binding/implementationType", - keyword: "enum", - message: "should be equal to one of the allowed values", + dataPath: '/properties/0/binding/implementationType', + keyword: 'enum', + message: 'should be equal to one of the allowed values', params: { allowedValues: [ - "class", - "delegateExpression", - "expression", - "script" + 'class', + 'delegateExpression', + 'expression', + 'script' ] }, - schemaPath: "#/allOf/1/items/allOf/1/then/properties/binding/properties/implementationType/enum" + schemaPath: '#/allOf/1/items/allOf/1/then/properties/binding/properties/implementationType/enum' }, { - dataPath: "/properties/0", - keyword: "if", - message: "should match \"then\" schema", + dataPath: '/properties/0', + keyword: 'if', + message: 'should match "then" schema', params: { - failingKeyword: "then" + failingKeyword: 'then' }, - schemaPath: "#/allOf/1/items/allOf/1/if" + schemaPath: '#/allOf/1/items/allOf/1/if' }, { dataPath: '/properties/1/binding', - keyword: "oneOf", - message: "should match exactly one schema in oneOf", + keyword: 'oneOf', + message: 'should match exactly one schema in oneOf', params: { passingSchemas: [ 0, 1 ] }, - schemaPath: "#/allOf/1/items/allOf/1/then/properties/binding/oneOf" + schemaPath: '#/allOf/1/items/allOf/1/then/properties/binding/oneOf' }, { dataPath: '/properties/1', - keyword: "if", - message: "should match \"then\" schema", + keyword: 'if', + message: 'should match "then" schema', params: { - failingKeyword: "then", + failingKeyword: 'then', }, - schemaPath: "#/allOf/1/items/allOf/1/if" + schemaPath: '#/allOf/1/items/allOf/1/if' }, { dataPath: '/properties/2/binding', - keyword: "not", - message: "should NOT be valid", + keyword: 'not', + message: 'should NOT be valid', params: {}, - schemaPath: "#/allOf/1/items/allOf/1/then/properties/binding/oneOf/0/not" + schemaPath: '#/allOf/1/items/allOf/1/then/properties/binding/oneOf/0/not' }, { dataPath: '/properties/2/binding', - keyword: "required", + keyword: 'required', message: "should have required property 'scriptFormat'", params: { - missingProperty: "scriptFormat" + missingProperty: 'scriptFormat' }, - schemaPath: "#/allOf/1/items/allOf/1/then/properties/binding/oneOf/1/required" + schemaPath: '#/allOf/1/items/allOf/1/then/properties/binding/oneOf/1/required' }, { dataPath: '/properties/2/binding', - keyword: "not", - message: "should NOT be valid", + keyword: 'not', + message: 'should NOT be valid', params: {}, - schemaPath: "#/allOf/1/items/allOf/1/then/properties/binding/oneOf/2/allOf/0/not" + schemaPath: '#/allOf/1/items/allOf/1/then/properties/binding/oneOf/2/allOf/0/not' }, { dataPath: '/properties/2/binding', - keyword: "oneOf", - message: "should match exactly one schema in oneOf", + keyword: 'oneOf', + message: 'should match exactly one schema in oneOf', params: { passingSchemas: null }, - schemaPath: "#/allOf/1/items/allOf/1/then/properties/binding/oneOf" - }, + schemaPath: '#/allOf/1/items/allOf/1/then/properties/binding/oneOf' + }, { dataPath: '/properties/2', - keyword: "if", - message: "should match \"then\" schema", + keyword: 'if', + message: 'should match "then" schema', params: { - failingKeyword: "then" + failingKeyword: 'then' }, - schemaPath: "#/allOf/1/items/allOf/1/if" + schemaPath: '#/allOf/1/items/allOf/1/if' }, { - dataPath: "", - keyword: "type", - message: "should be array", + dataPath: '', + keyword: 'type', + message: 'should be array', params: { - type: "array" + type: 'array' }, - schemaPath: "#/oneOf/1/type" + schemaPath: '#/oneOf/1/type' }, { - dataPath: "", - keyword: "oneOf", - message: "should match exactly one schema in oneOf", + dataPath: '', + keyword: 'oneOf', + message: 'should match exactly one schema in oneOf', params: { passingSchemas: null }, - schemaPath: "#/oneOf" + schemaPath: '#/oneOf' } ]; diff --git a/packages/element-templates-json-schema/test/spec/validationSpec.js b/packages/element-templates-json-schema/test/spec/validationSpec.js index e995d21..55673e1 100644 --- a/packages/element-templates-json-schema/test/spec/validationSpec.js +++ b/packages/element-templates-json-schema/test/spec/validationSpec.js @@ -271,7 +271,7 @@ describe('validation', function() { testTemplate('invalid-execution-listener-implementation-type'); - }) + }); describe('grouping', function() {