Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
LiviaMedeiros committed Aug 19, 2023
1 parent 18b320e commit 235dec5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
1 change: 1 addition & 0 deletions bin/poteto-cat.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const [,,...urls] = process.argv;
// chunks from different files may come in arbitrary order
// low memory footprint
// READ method will be used even for remote addresses
// eslint-disable-next-line no-unused-vars
const catConcurrent = urls =>
Promise.all(urls.map(url =>
poteto(url, { method: 'READ' }).then(printResponse)
Expand Down
1 change: 1 addition & 0 deletions lib/fs.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { open } from 'node:fs/promises';

const rangeToFSOpts = (range, size = Infinity) => {
size = Number(size);

let [start, end] = range.split('-').map($ => $ === '' ? null : Number($));
end ??= size - 1;
start ?? (start = size - end, end = size - 1);
Expand Down
5 changes: 1 addition & 4 deletions test/redirect.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ import test from 'node:test';
chdir(fileURLToPath(new URL('../testdir/redirect/', import.meta.url)));

const filename = `deleteme-${Math.random()}`;
const relativeURL = `./${filename}`;
const absoluteURL = new URL(`../testdir/redirect/${relativeURL}`, import.meta.url);
const href = absoluteURL.href;

const _ = ($ = filename) => [
filename => filename,
Expand All @@ -18,7 +15,7 @@ const _ = ($ = filename) => [
filename => new URL(`../testdir/redirect/./${filename}`, import.meta.url).href,
][Math.floor(Math.random() * 4)]($);

test('redirect', async t => {
test('redirect', async () => {
let resp;
let text;
let json;
Expand Down
5 changes: 1 addition & 4 deletions test/sequence.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ const validate = (actual, expected = {}, headers = {}) => {
}

const filename = `deleteme-${Math.random()}`;
const relativeURL = `./${filename}`;
const absoluteURL = new URL(`../testdir/sequence/${relativeURL}`, import.meta.url);
const href = absoluteURL.href;

const _ = ($ = filename) => [
filename => filename,
Expand All @@ -44,7 +41,7 @@ const _ = ($ = filename) => [
filename => new URL(`../testdir/sequence/./${filename}`, import.meta.url).href,
][Math.floor(Math.random() * 4)]($);

test('sequence', async t => {
test('sequence', async () => {
let resp;
let text;
let json;
Expand Down

0 comments on commit 235dec5

Please sign in to comment.