Skip to content
Snippets Groups Projects
Verified Commit 52ccff35 authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

chore: add tests

parent 764d9488
No related branches found
No related tags found
No related merge requests found
...@@ -406,6 +406,11 @@ function transform(value) { ...@@ -406,6 +406,11 @@ function transform(value) {
throw new Error("missing key parameter"); throw new Error("missing key parameter");
} }
if (isString(key)&&key.trim()==="") {
concat += key;
continue;
}
if (!pf2.exists(key)) { if (!pf2.exists(key)) {
concat += key; concat += key;
continue; continue;
......
...@@ -28,6 +28,9 @@ describe('Transformer', function () { ...@@ -28,6 +28,9 @@ describe('Transformer', function () {
[ [
['concat:a.b.c:test:a.b.d', {a: {b: {c: 4, d: 6}}}, "4test6"], ['concat:a.b.c:test:a.b.d', {a: {b: {c: 4, d: 6}}}, "4test6"],
['concat:a.b.c:\\ \\ :a.b.d', {a: {b: {c: 4, d: 6}}}, "4 6"],
['concat:a.b.c:,:a.b.d', {a: {b: {c: 4, d: 6}}}, "4,6"],
['concat:a.b.c:,:\\ :a.b.d', {a: {b: {c: 4, d: 6}}}, "4, 6"],
['??:a', null, 'a'], ['??:a', null, 'a'],
['??:a', undefined, 'a'], ['??:a', undefined, 'a'],
['??:a', 'true', 'true'], ['??:a', 'true', 'true'],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment