Skip to content

Commit 59a26be

Browse files
committed
chore(lib-storage): move test files to src folder
1 parent 17bf70b commit 59a26be

File tree

8 files changed

+12
-16
lines changed

8 files changed

+12
-16
lines changed

lib/lib-storage/jest.config.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,4 @@ const base = require("../../jest.config.base.js");
22

33
module.exports = {
44
...base,
5-
preset: "ts-jest",
6-
testEnvironment: "node",
7-
testMatch: ["**/lib/lib-storage/test/**/*.spec.ts?(x)"],
85
};

lib/lib-storage/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
"types": "./types/index.d.ts",
88
"scripts": {
99
"prepublishOnly": "yarn build:cjs && yarn build:es",
10-
"pretest": "yarn build:cjs",
1110
"build:cjs": "tsc -p tsconfig.cjs.json",
1211
"build:es": "tsc -p tsconfig.es.json",
1312
"build": "yarn build:es && yarn build:cjs",

lib/lib-storage/test/upload.spec.ts renamed to lib/lib-storage/src/Upload.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jest.mock("@aws-sdk/client-s3", () => ({
2828
}));
2929

3030
import { S3 } from "@aws-sdk/client-s3";
31-
import { Upload, Progress } from "../src/index";
31+
import { Upload, Progress } from "./index";
3232

3333
describe(Upload.name, () => {
3434
beforeEach(() => {

lib/lib-storage/test/data-chunk/buffer-chunk.spec.ts renamed to lib/lib-storage/src/chunks/getChunkBuffer.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { byteLength } from "../../src/bytelength";
2-
import { getChunkBuffer } from "../../src/chunks/getChunkBuffer";
1+
import { byteLength } from "../bytelength";
2+
import { getChunkBuffer } from "./getChunkBuffer";
33

44
describe.only(getChunkBuffer.name, () => {
55
const getBuffer = (size: number) => Buffer.from("#".repeat(size));

lib/lib-storage/test/data-chunk/readable-chunk.spec.ts renamed to lib/lib-storage/src/chunks/getDataReadable.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { Readable } from "stream";
2-
import { byteLength } from "../../src/bytelength";
3-
import { getChunkStream as chunkFromReadable } from "../../src/chunks/getChunkStream";
4-
import { getDataReadable } from "../../src/chunks/getDataReadable";
5-
import { RawDataPart as DataPart } from "../../src/Upload";
2+
import { byteLength } from "../bytelength";
3+
import { getChunkStream as chunkFromReadable } from "./getChunkStream";
4+
import { getDataReadable } from "./getDataReadable";
5+
import { RawDataPart as DataPart } from "../Upload";
66

77
const fs = require("fs");
88

lib/lib-storage/test/data-chunk/readable-stream-chunk.spec.ts renamed to lib/lib-storage/src/chunks/getDataReadableStream.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// polyfill exposes the same ReadableStream API as web, allowing easy testing
22
import { ReadableStream } from "web-streams-polyfill";
33

4-
import { byteLength } from "../../src/bytelength";
5-
import { getChunkStream as chunkFromReadable } from "../../src/chunks/getChunkStream";
6-
import { getDataReadableStream } from "../../src/chunks/getDataReadableStream";
7-
import { RawDataPart as DataPart } from "../../src/Upload";
4+
import { byteLength } from "../bytelength";
5+
import { getChunkStream as chunkFromReadable } from "./getChunkStream";
6+
import { getDataReadableStream } from "./getDataReadableStream";
7+
import { RawDataPart as DataPart } from "../Upload";
88

99
describe("chunkFromReadable.name", () => {
1010
// larger than the 5mb min chunk size

lib/lib-storage/test/storage.spec.ts renamed to lib/lib-storage/src/index.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as Storage from "../src/index";
1+
import * as Storage from "./index";
22

33
describe("Storage Packages", () => {
44
it("has Upload", () => {

0 commit comments

Comments
 (0)