From f8876ab60b5e8fa606073d6c48aa1395dbadd88b Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Thu, 18 Oct 2018 13:15:39 +0200 Subject: Remove sra-report --- .../sra-report/test/postman_collection_v0_test.ts | 76 ---------------------- 1 file changed, 76 deletions(-) delete mode 100644 packages/sra-report/test/postman_collection_v0_test.ts (limited to 'packages/sra-report/test/postman_collection_v0_test.ts') 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, - ); - }); - }); -}); -- cgit v1.2.3