Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(archive): format test names #3984

Merged
merged 4 commits into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions archive/tar_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Deno.test("createTarArchive", async function () {
assertEquals(wrote, 3072);
});

Deno.test("deflateTarArchive", async function () {
Deno.test("Tar() deflates tar archive", async function () {
const fileName = "output.txt";
const text = "hello tar world!";

Expand All @@ -67,7 +67,7 @@ Deno.test("deflateTarArchive", async function () {
assertEquals(untarText, text);
});

Deno.test("appendFileWithLongNameToTarArchive", async function (): Promise<
Deno.test("Tar() appends file with long name to tar archive", async function (): Promise<
void
> {
// 9 * 15 + 13 = 148 bytes
Expand Down Expand Up @@ -95,7 +95,7 @@ Deno.test("appendFileWithLongNameToTarArchive", async function (): Promise<
assertEquals(untarText, text);
});

Deno.test("directoryEntryType", async function () {
Deno.test("Tar() checks directory entry type", async function () {
const tar = new Tar();

tar.append("directory/", {
Expand Down
22 changes: 10 additions & 12 deletions archive/untar_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ async function createTar(entries: TestEntry[]): Promise<Tar> {
return tar;
}

Deno.test("untarAsyncIterator", async function () {
Deno.test("Untar() works as an async iterator", async () => {
const entries: TestEntry[] = [
{
name: "output.txt",
Expand Down Expand Up @@ -77,9 +77,7 @@ Deno.test("untarAsyncIterator", async function () {
assertEquals(entries.length, 0);
});

Deno.test("untarAsyncIteratorWithoutReadingBody", async function (): Promise<
void
> {
Deno.test("Untar() reads without body", async () => {
const entries: TestEntry[] = [
{
name: "output.txt",
Expand All @@ -106,8 +104,8 @@ Deno.test("untarAsyncIteratorWithoutReadingBody", async function (): Promise<
});

Deno.test(
"untarAsyncIteratorWithoutReadingBodyFromFileReader",
async function () {
"Untar() reads without body from FileReader",
async () => {
const entries: TestEntry[] = [
{
name: "output.txt",
Expand Down Expand Up @@ -142,7 +140,7 @@ Deno.test(
},
);

Deno.test("untarAsyncIteratorFromFileReader", async function () {
Deno.test("Untar() reads from FileReader", async () => {
const entries: TestEntry[] = [
{
name: "output.txt",
Expand Down Expand Up @@ -184,8 +182,8 @@ Deno.test("untarAsyncIteratorFromFileReader", async function () {
});

Deno.test(
"untarAsyncIteratorReadingLessThanRecordSize",
async function () {
"Untar() reads less than record size",
async () => {
// record size is 512
const bufSizes = [1, 53, 256, 511];

Expand Down Expand Up @@ -229,7 +227,7 @@ Deno.test(
},
);

Deno.test("untarLinuxGeneratedTar", async function () {
Deno.test("Untar() works with Linux generated tar", async () => {
const filePath = resolve(testdataDir, "deno.tar");
const file = await Deno.open(filePath, { read: true });

Expand Down Expand Up @@ -326,7 +324,7 @@ Deno.test("untarLinuxGeneratedTar", async function () {
});

Deno.test({
name: "test TarEntry",
name: "TarEntry() handles meta",
// only: true,
fn() {
// test TarEntry class
Expand Down Expand Up @@ -354,7 +352,7 @@ Deno.test({
},
});

Deno.test("untarArchiveWithLink", async function () {
Deno.test("Untar() handles archive with link", async function () {
const filePath = resolve(testdataDir, "with_link.tar");
const file = await Deno.open(filePath, { read: true });

Expand Down