Skip to content
This repository was archived by the owner on Nov 6, 2023. It is now read-only.

Commit c67a414

Browse files
author
Torsten Link
committed
fix(interceptor): Fix how the config will be given to the underlying module.
Adapted the test for this fix.
1 parent 068c0e4 commit c67a414

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

lib/interceptor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class ChunkProcessorInterceptor extends Interceptor {
1414
super(endpoint, config);
1515

1616
// just validate the config once
17-
parserFactory(config, true);
17+
parserFactory(config.config, true);
1818
}
1919

2020
static get name() {

schema/chunk.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "http://json-schema.org/draft-04/schema#",
3-
"description": "The import description.",
3+
"description": "The chunk processor description.",
44
"type": "object",
55
"additionalProperties": false,
66
"required": ["keyHashFields", "keyHashName"],

tests/interceptor_test.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,15 @@ const stepMock = {
2121
};
2222

2323
const checkProperties = {
24-
"keyHashFields": ["first", "last"],
25-
"keyHashName": "__key",
26-
"contentHashFields": ["first", "last", "friends"],
27-
"contentHashName": "__content",
28-
"scopeHashFields": ["street"],
29-
"scopeHashName": "__scope",
30-
"multiRowFields": ["friends"]
24+
"config": {
25+
"keyHashFields": ["first", "last"],
26+
"keyHashName": "__key",
27+
"contentHashFields": ["first", "last", "friends"],
28+
"contentHashName": "__content",
29+
"scopeHashFields": ["street"],
30+
"scopeHashName": "__scope",
31+
"multiRowFields": ["friends"]
32+
}
3133
};
3234

3335

0 commit comments

Comments
 (0)