Skip to content

Commit

Permalink
Merge pull request #116 from BRP-API/chore/sync-met-source-repo_7e705ff
Browse files Browse the repository at this point in the history
sync met 'BRP-API/brp-shared' repo
  • Loading branch information
MelvLee authored Oct 1, 2024
2 parents 03a8d20 + e1143d9 commit 3289e06
Show file tree
Hide file tree
Showing 4 changed files with 171 additions and 81 deletions.
30 changes: 30 additions & 0 deletions features/docs/dan-stap-definities-algemeen.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#language: nl

@skip-verify
Functionaliteit: Geen javascript fout bij ongeldig response

Scenario: naam veld in de response heeft de waarde null
Gegeven de response body is gelijk aan
"""
{
"personen": [
{
"naam": null
}
]
}
"""
Dan heeft de response geen personen

Scenario: naam veld in de response heeft de waarde undefined
Gegeven de response body is gelijk aan
"""
{
"personen": [
{
"naam": undefined
}
]
}
"""
Dan heeft de response geen personen
2 changes: 2 additions & 0 deletions features/step_definitions/stringify.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
function stringifyValues(o) {
if(o === undefined) return o;

if(o === null) return 'null';

Object.keys(o).forEach(k => {
if (typeof o[k] === 'object') {
o[k] = stringifyValues(o[k]);
Expand Down
Loading

0 comments on commit 3289e06

Please sign in to comment.