move test data to __fixtures__

This commit is contained in:
Qing Ye
2020-10-08 00:17:58 +08:00
parent 30250e1afa
commit fe1618d1d8
3 changed files with 1 additions and 4 deletions

View File

@@ -1,16 +0,0 @@
export const TEST_URL = "https://httpbin.org"
export const TEST_PATH_NAME = "/path/to"
export const TEST_QUERY_STRING = "?a=b"
export const TEST_HTTP_USER = "mockUser"
export const TEST_HTTP_PASSWORD = "mockPassword"
export const TEST_BEARER_TOKEN = "abcdefghijklmn"
export const TEST_RAW_REQUEST_BODY = "foo=bar&baz=qux"
export const TEST_RAW_PARAMS_JSON = '{"foo": "bar", "baz": "qux"}'
export const TEST_RAW_PARAMS_XML = `<?xml version=\'1.0\' encoding=\'utf-8\'?>
<xml>
<element foo="bar"></element>
</xml>`
export const TEST_HEADERS = [
{ key: "h1", value: "h1v" },
{ key: "h2", value: "h2v" },
]

View File

@@ -10,7 +10,7 @@ import {
TEST_RAW_PARAMS_XML,
TEST_RAW_REQUEST_BODY,
TEST_URL,
} from "./fixtures"
} from "../__fixtures__/test-data"
describe("generate request for NodeJs Native", () => {
test("generate GET request", () => {