From 256e8cd4dc672887461d1fa6598c382550ea372b Mon Sep 17 00:00:00 2001 From: 117 <16513382+117@users.noreply.github.com> Date: Fri, 29 Mar 2024 16:01:23 -0600 Subject: [PATCH] Remove unused test files and dependencies --- package.json | 41 ------------------- {src/factory => test}/createClient.test.ts | 4 +- .../createTokenBucket.test.ts | 2 +- {src/api => test}/marketData.test.ts | 0 {src/util => test}/mockFetch.test.ts | 2 +- {src/api => test}/trade.test.ts | 0 6 files changed, 4 insertions(+), 45 deletions(-) delete mode 100644 package.json rename {src/factory => test}/createClient.test.ts (96%) rename {src/factory => test}/createTokenBucket.test.ts (94%) rename {src/api => test}/marketData.test.ts (100%) rename {src/util => test}/mockFetch.test.ts (96%) rename {src/api => test}/trade.test.ts (100%) diff --git a/package.json b/package.json deleted file mode 100644 index 4fea5af..0000000 --- a/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "@alpacahq/typescript-sdk", - "version": "0.0.0", - "description": "A TypeScript SDK for the https://alpaca.markets REST API and WebSocket streams.", - "main": "dist/index.js", - "types": "dist/index.d.ts", - "files": [ - "dist" - ], - "repository": { - "type": "git", - "url": "git+https://github.com/@alpacahq/typescript-sdk.git" - }, - "keywords": [ - "alpaca", - "alpaca.markets", - "alpaca api", - "alpaca sdk", - "alpaca typescript", - "alpaca websocket", - "alpaca rest", - "alpaca trading", - "alpaca trading api", - "alpaca trading sdk", - "alpaca trading typescript", - "alpaca trading websocket", - "alpaca trading rest", - "alpaca markets", - "alpaca markets api", - "alpaca markets sdk", - "alpaca markets typescript", - "alpaca markets websocket", - "alpaca markets rest" - ], - "author": "117", - "license": "MIT", - "bugs": { - "url": "https://github.com/@alpacahq/typescript-sdk/issues" - }, - "homepage": "https://github.com/@alpacahq/typescript-sdk#readme" -} diff --git a/src/factory/createClient.test.ts b/test/createClient.test.ts similarity index 96% rename from src/factory/createClient.test.ts rename to test/createClient.test.ts index 2d8a1e9..a9b8bfd 100644 --- a/src/factory/createClient.test.ts +++ b/test/createClient.test.ts @@ -1,8 +1,8 @@ import { assert } from "https://deno.land/std@0.217.0/assert/assert.ts"; import { assertEquals } from "https://deno.land/std@0.220.0/assert/assert_equals.ts"; import { assertThrows } from "https://deno.land/std@0.220.0/assert/assert_throws.ts"; -import { createClient } from "../factory/createClient.ts"; -import { mockFetch } from "../util/mockFetch.ts"; +import { createClient } from "../src/factory/createClient.ts"; +import { mockFetch } from "../src/util/mockFetch.ts"; Deno.test( "createClient should create a trade client with valid options", diff --git a/src/factory/createTokenBucket.test.ts b/test/createTokenBucket.test.ts similarity index 94% rename from src/factory/createTokenBucket.test.ts rename to test/createTokenBucket.test.ts index 5c209d3..d6b8c14 100644 --- a/src/factory/createTokenBucket.test.ts +++ b/test/createTokenBucket.test.ts @@ -1,5 +1,5 @@ import { assert } from "https://deno.land/std@0.217.0/assert/assert.ts"; -import { createTokenBucket } from "./createTokenBucket.ts"; +import { createTokenBucket } from "../src/factory/createTokenBucket.ts"; Deno.test( "createTokenBucket should allow taking tokens within capacity", diff --git a/src/api/marketData.test.ts b/test/marketData.test.ts similarity index 100% rename from src/api/marketData.test.ts rename to test/marketData.test.ts diff --git a/src/util/mockFetch.test.ts b/test/mockFetch.test.ts similarity index 96% rename from src/util/mockFetch.test.ts rename to test/mockFetch.test.ts index 5b9f1f1..18d46a5 100644 --- a/src/util/mockFetch.test.ts +++ b/test/mockFetch.test.ts @@ -1,5 +1,5 @@ import { assert } from "https://deno.land/std@0.217.0/assert/assert.ts"; -import { mockFetch } from "./mockFetch.ts"; +import { mockFetch } from "../src/util/mockFetch.ts"; Deno.test("mockFetch should return a function", () => { const response = { data: "mocked response" }; diff --git a/src/api/trade.test.ts b/test/trade.test.ts similarity index 100% rename from src/api/trade.test.ts rename to test/trade.test.ts