diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-10-18 19:24:49 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-18 19:24:49 +0800 |
commit | 9e8bca69a8a1d3570e30a28f150c0bec3848a760 (patch) | |
tree | 11eaac8886369ce40fd7acac66f5aa8985e6af61 /packages/sra-report/test/postman_collection_v0_test.ts | |
parent | 325af82217e994fdde8e904b93a76e6e3461f85a (diff) | |
parent | f8876ab60b5e8fa606073d6c48aa1395dbadd88b (diff) | |
download | dexon-sol-tools-9e8bca69a8a1d3570e30a28f150c0bec3848a760.tar dexon-sol-tools-9e8bca69a8a1d3570e30a28f150c0bec3848a760.tar.gz dexon-sol-tools-9e8bca69a8a1d3570e30a28f150c0bec3848a760.tar.bz2 dexon-sol-tools-9e8bca69a8a1d3570e30a28f150c0bec3848a760.tar.lz dexon-sol-tools-9e8bca69a8a1d3570e30a28f150c0bec3848a760.tar.xz dexon-sol-tools-9e8bca69a8a1d3570e30a28f150c0bec3848a760.tar.zst dexon-sol-tools-9e8bca69a8a1d3570e30a28f150c0bec3848a760.zip |
Merge pull request #1155 from 0xProject/feature/RIP-sra-report
Remove sra-report
Diffstat (limited to 'packages/sra-report/test/postman_collection_v0_test.ts')
-rw-r--r-- | packages/sra-report/test/postman_collection_v0_test.ts | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/packages/sra-report/test/postman_collection_v0_test.ts b/packages/sra-report/test/postman_collection_v0_test.ts deleted file mode 100644 index dfb16b10d..000000000 --- a/packages/sra-report/test/postman_collection_v0_test.ts +++ /dev/null @@ -1,76 +0,0 @@ -import 'mocha'; -import * as nock from 'nock'; - -import * as defaultRequestTokenPairsResponseJSON from './fixtures/v0/token_pairs/default_request.json'; -import * as malformedTokenPairsResponseJSON from './fixtures/v0/token_pairs/malformed.json'; -import * as tokenAAndTokenBParamsTokenPairsResponseJSON from './fixtures/v0/token_pairs/token_a_and_token_b_params.json'; -import * as tokenAParamTokenPairsResponseJSON from './fixtures/v0/token_pairs/token_a_param.json'; -import * as tokenBParamTokenPairsResponseJSON from './fixtures/v0/token_pairs/token_b_param.json'; -import { testRunner } from './test_runner'; - -describe('Postman Collection v0', () => { - const testRelayerUrl = 'https://example.com'; - const nockScope = nock(testRelayerUrl); - afterEach(() => { - nock.cleanAll(); - }); - describe('GET /token_pairs', () => { - const postmanCollectionFolderName = 'GET /token_pairs'; - const resourcePath = '/token_pairs'; - describe('default request', () => { - const postmanCollectionRequestName = 'default request'; - const nockInterceptor = nockScope.get(resourcePath); - testRunner.runContentTypeTests(nockInterceptor, postmanCollectionFolderName, postmanCollectionRequestName); - testRunner.runSchemaTests( - nockInterceptor, - postmanCollectionFolderName, - postmanCollectionRequestName, - malformedTokenPairsResponseJSON, - defaultRequestTokenPairsResponseJSON, - ); - }); - describe('tokenA param', () => { - const postmanCollectionRequestName = 'tokenA param'; - const nockInterceptor = nockScope.get(resourcePath).query({ - tokenA: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', - }); - testRunner.runContentTypeTests(nockInterceptor, postmanCollectionFolderName, postmanCollectionRequestName); - testRunner.runSchemaTests( - nockInterceptor, - postmanCollectionFolderName, - postmanCollectionRequestName, - malformedTokenPairsResponseJSON, - tokenAParamTokenPairsResponseJSON, - ); - }); - describe('tokenB param', () => { - const postmanCollectionRequestName = 'tokenB param'; - const nockInterceptor = nockScope.get(resourcePath).query({ - tokenB: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', - }); - testRunner.runContentTypeTests(nockInterceptor, postmanCollectionFolderName, postmanCollectionRequestName); - testRunner.runSchemaTests( - nockInterceptor, - postmanCollectionFolderName, - postmanCollectionRequestName, - malformedTokenPairsResponseJSON, - tokenBParamTokenPairsResponseJSON, - ); - }); - describe('tokenA and tokenB params', () => { - const postmanCollectionRequestName = 'tokenA and tokenB params'; - const nockInterceptor = nockScope.get(resourcePath).query({ - tokenA: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', - tokenB: '0xe41d2489571d322189246dafa5ebde1f4699f498', - }); - testRunner.runContentTypeTests(nockInterceptor, postmanCollectionFolderName, postmanCollectionRequestName); - testRunner.runSchemaTests( - nockInterceptor, - postmanCollectionFolderName, - postmanCollectionRequestName, - malformedTokenPairsResponseJSON, - tokenAAndTokenBParamsTokenPairsResponseJSON, - ); - }); - }); -}); |