From eaca1a981de231e80162b6d5654b3cfebfd67db6 Mon Sep 17 00:00:00 2001 From: Niccolo Borgioli Date: Sun, 25 Aug 2024 22:21:45 +0200 Subject: [PATCH] cleanup --- test/cli/file/simple.spec.ts | 7 ++++--- test/cli/text/simple.spec.ts | 4 ++-- test/web/file/too-big.spec.ts | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/test/cli/file/simple.spec.ts b/test/cli/file/simple.spec.ts index ac49191..2acf339 100644 --- a/test/cli/file/simple.spec.ts +++ b/test/cli/file/simple.spec.ts @@ -1,10 +1,11 @@ import { test } from '@playwright/test' import { basename } from 'node:path' -import { Files, getFileChecksum, rm, tmpFile } from '../../files' +import { rm } from 'node:fs/promises' +import { Files, getFileChecksum, tmpFile } from '../../files' import { CLI, getLinkFromCLI } from '../../utils' test.describe('file @cli', () => { - test('simple', async ({ page }) => { + test('simple', async () => { const file = await tmpFile(Files.Image) const checksum = await getFileChecksum(file) const note = await CLI('send', 'file', file) @@ -17,7 +18,7 @@ test.describe('file @cli', () => { test.expect(checksum).toBe(c) }) - test('simple with password', async ({ page }) => { + test('simple with password', async () => { const file = await tmpFile(Files.Image) const password = 'password' const checksum = await getFileChecksum(file) diff --git a/test/cli/text/simple.spec.ts b/test/cli/text/simple.spec.ts index 6286b4b..8e7d90f 100644 --- a/test/cli/text/simple.spec.ts +++ b/test/cli/text/simple.spec.ts @@ -2,7 +2,7 @@ import { test } from '@playwright/test' import { CLI, getLinkFromCLI } from '../../utils' test.describe('text @cli', () => { - test('simple', async ({ page }) => { + test('simple', async () => { const text = `Endless prejudice endless play derive joy eternal-return selfish burying. Of decieve play pinnacle faith disgust. Spirit reason salvation burying strong of joy ascetic selfish against merciful sea truth. Ubermensch moral prejudice derive chaos mountains ubermensch justice philosophy justice ultimate joy ultimate transvaluation. Virtues convictions war ascetic eternal-return spirit. Ubermensch transvaluation noble revaluation sexuality intentions salvation endless decrepit hope noble fearful. Justice ideal ultimate snare god joy evil sexuality insofar gains oneself ideal.` const note = await CLI('send', 'text', text) const link = getLinkFromCLI(note.stdout) @@ -11,7 +11,7 @@ test.describe('text @cli', () => { test.expect(retrieved.stdout.trim()).toBe(text) }) - test('simple with password', async ({ page }) => { + test('simple with password', async () => { const text = `Endless prejudice endless play derive joy eternal-return selfish burying.` const password = 'password' const note = await CLI('send', 'text', text, '--password', password) diff --git a/test/web/file/too-big.spec.ts b/test/web/file/too-big.spec.ts index a441ea1..f677d55 100644 --- a/test/web/file/too-big.spec.ts +++ b/test/web/file/too-big.spec.ts @@ -5,6 +5,6 @@ import { Files } from '../../files' test.describe('@web', () => { test('to big zip', async ({ page }) => { const files = [Files.Zip] - const link = await createNote(page, { files, error: 'note is to big' }) + await createNote(page, { files, error: 'note is to big' }) }) })