Created
May 26, 2021 18:31
-
-
Save sergueyarellano/4d5debba9b19b143a45c26da6fb70926 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ... | |
test('composeRequest() should compose request options so they can be consumed by the GOT http customer module ', async function ({ deepEqual, end }) { | |
const config = { | |
endpoint: 'foo', | |
host: 'http://localhost:3333', | |
method: 'GET', | |
headers: { 'content-type': 'application/json' } | |
} | |
// composeRequest :: Payload -> Payload | |
const actual = composeRequest(lift(config)) | |
const expected = { | |
event: { body: {} }, | |
data: { | |
config, | |
request: { | |
uri: new URL('foo', 'http://localhost:3333'), | |
options: { | |
method: 'GET', | |
headers: { 'content-type': 'application/json' } | |
} | |
} | |
}, | |
result: {} | |
} | |
deepEqual(actual, expected) | |
end() | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment