Skip to content

Commit

Permalink
Merge pull request #21 from BRP-API/chore/sync-met-source-repo_daacc46
Browse files Browse the repository at this point in the history
sync met 'BRP-API/brp-shared-dotnet' repo
MelvLee authored Oct 2, 2024
2 parents 45f399b + bf54866 commit 77b71d1
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]);
Loading

0 comments on commit 77b71d1

Please sign in to comment.