src/__tests__/__snapshots__/config.spec.js.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Config should load multiple hosts 1`] = `
Config {
"COOKIEJAR": false,
"DEFAULTS": Object {
"HEADERS": Object {
"hello": "mars",
},
},
"ENDPOINT": "http://example.org",
"ENVIRONMENT": Object {},
"HOSTS": Array [
Object {
"GET /e2": "e2",
"GET /posts": "posts",
"defaults": Object {
"HEADERS": Object {
"hello": "world",
"world": "hello",
},
},
"endpoint": "http://example.com",
"host": "com",
},
Object {
"GET /e3": "e3",
"GET /posts": "posts",
"defaults": Object {
"HEADERS": Object {
"hello": "world",
"world": "bye",
},
},
"endpoint": "http://example.net",
"host": "net",
},
Object {
"GET /posts": "posts",
"endpoint": "http://example.info",
"host": "info",
},
],
"PLUGINS": Plugins {
"autoload": Array [
"std",
],
"context": Object {},
"registry": Object {
"dynamicValues": Array [],
"postRequestModifiers": Array [],
"preRequestModifiers": Array [],
},
},
"REQUESTS": Array [
Object {
"ALIAS": "e1",
"COOKIEJAR": false,
"ENDPOINT": "http://example.org",
"HEADERS": Object {
"hello": "mars",
},
"REQUEST": "GET /e1",
},
Object {
"ALIAS": "com:e2",
"COOKIEJAR": false,
"ENDPOINT": "http://example.com",
"HEADERS": Object {
"hello": "world",
"world": "hello",
},
"REQUEST": "GET /e2",
},
Object {
"ALIAS": "com:posts",
"COOKIEJAR": false,
"ENDPOINT": "http://example.com",
"HEADERS": Object {
"hello": "world",
"world": "hello",
},
"REQUEST": "GET /posts",
},
Object {
"ALIAS": "net:e3",
"COOKIEJAR": false,
"ENDPOINT": "http://example.net",
"HEADERS": Object {
"hello": "world",
"world": "bye",
},
"REQUEST": "GET /e3",
},
Object {
"ALIAS": "net:posts",
"COOKIEJAR": false,
"ENDPOINT": "http://example.net",
"HEADERS": Object {
"hello": "world",
"world": "bye",
},
"REQUEST": "GET /posts",
},
Object {
"ALIAS": "info:posts",
"COOKIEJAR": false,
"ENDPOINT": "http://example.info",
"HEADERS": Object {
"hello": "mars",
},
"REQUEST": "GET /posts",
},
],
"VERSION": 1,
"configKeys": Array [
"VERSION",
"ENDPOINT",
"PLUGINS",
"DEFAULTS",
"ENVIRONMENT",
"HOSTS",
"COOKIEJAR",
],
}
`;
exports[`Config should set up defaults for all requests 1`] = `
Config {
"COOKIEJAR": false,
"DEFAULTS": Object {
"HEADERS": Object {
"authentication": "hello",
},
},
"ENDPOINT": "http://example.com",
"ENVIRONMENT": Object {},
"HOSTS": Array [],
"PLUGINS": Plugins {
"autoload": Array [
"std",
],
"context": Object {},
"registry": Object {
"dynamicValues": Array [],
"postRequestModifiers": Array [],
"preRequestModifiers": Array [],
},
},
"REQUESTS": Array [
Object {
"ALIAS": "get-post",
"COOKIEJAR": false,
"ENDPOINT": "http://example.com",
"HEADERS": Object {
"authentication": "hello",
},
"REQUEST": "GET /posts/1",
},
Object {
"ALIAS": "user",
"COOKIEJAR": false,
"ENDPOINT": "http://example.com",
"HEADERS": Object {
"authentication": "hello",
"hello": "world",
},
"REQUEST": "GET /user",
},
],
"VERSION": 1,
"configKeys": Array [
"VERSION",
"ENDPOINT",
"PLUGINS",
"DEFAULTS",
"ENVIRONMENT",
"HOSTS",
"COOKIEJAR",
],
}
`;