Skip to content

Commit c6c1900

Browse files
committed
Fix lint issues
1 parent 5ec71df commit c6c1900

File tree

2 files changed

+12
-14
lines changed

2 files changed

+12
-14
lines changed

eslint.config.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ export default tseslint.config(
1010
mochaPlugin.configs.flat.recommended,
1111
...tseslint.configs.strict,
1212
...tseslint.configs.stylistic,
13+
{
14+
ignores: ['dist/*', 'test/browser/main.js'],
15+
},
1316
{
1417
rules: {
1518
// TODO: Fix/ignore in tests and remove

test/browser/main.ts

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ const buffer = require('buffer');
55

66
describe('Browser tests', function () {
77
describe('reader', function () {
8+
let reader;
9+
10+
after(async function () {
11+
if (reader) await reader.close();
12+
});
13+
814
it('can read snappy compressed data', async function () {
915
// Data from test/test-files/snappy-compressed.parquet
1016
const uint8Array = [
@@ -25,16 +31,12 @@ describe('Browser tests', function () {
2531
101, 116, 106, 115, 0, 163, 0, 0, 0, 80, 65, 82, 49,
2632
];
2733
const snappyCompressedBuffer = buffer.Buffer.from(uint8Array);
28-
const reader = await parquetjs.ParquetReader.openBuffer(snappyCompressedBuffer);
34+
reader = await parquetjs.ParquetReader.openBuffer(snappyCompressedBuffer);
2935
const data: any[] = [];
3036
for await (const record of reader) {
3137
data.push(record);
3238
}
3339
assert.equal(data.length, 4);
34-
35-
after(async function () {
36-
await reader.close();
37-
});
3840
});
3941

4042
it('can read gzip compressed data', async function () {
@@ -110,16 +112,12 @@ describe('Browser tests', function () {
110112
57, 100, 53, 53, 97, 51, 41, 0, 71, 1, 0, 0, 80, 65, 82, 49,
111113
];
112114
const gzipCompressedBuffer = buffer.Buffer.from(uint8Array);
113-
const reader = await parquetjs.ParquetReader.openBuffer(gzipCompressedBuffer);
115+
reader = await parquetjs.ParquetReader.openBuffer(gzipCompressedBuffer);
114116
const data: any[] = [];
115117
for await (const record of reader) {
116118
data.push(record);
117119
}
118120
assert.equal(data.length, 25);
119-
120-
after(async function () {
121-
await reader.close();
122-
});
123121
});
124122

125123
it('can read brotli compressed data', async function () {
@@ -233,15 +231,12 @@ describe('Browser tests', function () {
233231
80, 65, 82, 49,
234232
];
235233
const brotliCompressedBuffer = buffer.Buffer.from(uint8Array);
236-
const reader = await parquetjs.ParquetReader.openBuffer(brotliCompressedBuffer);
234+
reader = await parquetjs.ParquetReader.openBuffer(brotliCompressedBuffer);
237235
const data: any[] = [];
238236
for await (const record of reader) {
239237
data.push(record);
240238
}
241239
assert.equal(data.length, 5);
242-
after(async function () {
243-
await reader.close();
244-
});
245240
});
246241
});
247242
});

0 commit comments

Comments
 (0)