diff --git a/gbfs-validator/__test__/__snapshots__/gbfs.test.js.snap b/gbfs-validator/__test__/__snapshots__/gbfs.test.js.snap index aa0f10c..9d753bd 100644 --- a/gbfs-validator/__test__/__snapshots__/gbfs.test.js.snap +++ b/gbfs-validator/__test__/__snapshots__/gbfs.test.js.snap @@ -2,13 +2,13 @@ exports[`initialization should correctly initialize validator per default 1`] = ` GBFS { - "auth": {}, - "gotOptions": { - "headers": { + "auth": Object {}, + "gotOptions": Object { + "headers": Object { "user-agent": "MobilityData GBFS-Validator/1.1.1 (Node 16.0.1)", }, }, - "options": { + "options": Object { "docked": false, "freefloating": false, "version": null, @@ -19,13 +19,13 @@ GBFS { exports[`initialization should correctly initialize validator with options 1`] = ` GBFS { - "auth": {}, - "gotOptions": { - "headers": { + "auth": Object {}, + "gotOptions": Object { + "headers": Object { "user-agent": "MobilityData GBFS-Validator/1.1.1 (Node 16.0.1)", }, }, - "options": { + "options": Object { "docked": true, "freefloating": true, "version": "v2.1", @@ -38,19 +38,19 @@ exports[`initialization should throw an error without url 1`] = `"Missing URL"`; exports[`initialization with auth should correctly initialize with \`basic_auth\` 1`] = ` GBFS { - "auth": { - "basicAuth": { + "auth": Object { + "basicAuth": Object { "password": "mypassword", "user": "myuser", }, "type": "basic_auth", }, - "gotOptions": { - "headers": { + "gotOptions": Object { + "headers": Object { "Authorization": "basic bXl1c2VyOm15cGFzc3dvcmQ=", }, }, - "options": { + "options": Object { "docked": false, "freefloating": false, "version": null, @@ -61,18 +61,18 @@ GBFS { exports[`initialization with auth should correctly initialize with \`bearer_token\` 1`] = ` GBFS { - "auth": { - "bearerToken": { + "auth": Object { + "bearerToken": Object { "token": "mytoken", }, "type": "bearer_token", }, - "gotOptions": { - "headers": { + "gotOptions": Object { + "headers": Object { "Authorization": "Bearer mytoken", }, }, - "options": { + "options": Object { "docked": false, "freefloating": false, "version": null, @@ -83,32 +83,32 @@ GBFS { exports[`initialization with auth should correctly initialize with multiple \`headers\` 1`] = ` GBFS { - "auth": { - "headers": [ - { + "auth": Object { + "headers": Array [ + Object { "key": "mykey", "value": "myvalue", }, - { + Object { "key": "mysecondkey", "value": "mysecondvalue", }, - { + Object { "key": "mythirdkey", "value": "mythirdvalue", }, ], "type": "headers", }, - "gotOptions": { - "headers": { + "gotOptions": Object { + "headers": Object { "mykey": "myvalue", "mysecondkey": "mysecondvalue", "mythirdkey": "mythirdvalue", "user-agent": "MobilityData GBFS-Validator/1.1.1 (Node 16.0.1)", }, }, - "options": { + "options": Object { "docked": false, "freefloating": false, "version": null, @@ -119,22 +119,22 @@ GBFS { exports[`initialization with auth should correctly initialize with one \`headers\` 1`] = ` GBFS { - "auth": { - "headers": [ - { + "auth": Object { + "headers": Array [ + Object { "key": "mykey", "value": "myvalue", }, ], "type": "headers", }, - "gotOptions": { - "headers": { + "gotOptions": Object { + "headers": Object { "mykey": "myvalue", "user-agent": "MobilityData GBFS-Validator/1.1.1 (Node 16.0.1)", }, }, - "options": { + "options": Object { "docked": false, "freefloating": false, "version": null,