This commit is contained in:
Kenny Daniel 2024-01-03 13:07:08 -08:00
parent 6616c2f7af
commit 58974da324
No known key found for this signature in database
GPG Key ID: 6A3C5E318BE71391
5 changed files with 12 additions and 3 deletions

@ -1,4 +1,7 @@
{
"env": {
"node": true
},
"parser": "@typescript-eslint/parser",
"extends": [
"eslint:recommended",
@ -30,7 +33,8 @@
"jsdoc/check-param-names": "error",
"jsdoc/check-property-names": "error",
"jsdoc/check-tag-names": "error",
"jsdoc/no-types": "error",
"jsdoc/require-param-type": "warn",
"jsdoc/require-returns-type": "warn",
"jsdoc/sort-tags": "error",
"no-constant-condition": "off",
"no-multi-spaces": "error",

@ -2,8 +2,13 @@ import { promises as fs } from 'fs'
import { describe, expect, it } from 'vitest'
import { castBigInts, parquetMetadata } from '../src/metadata'
// Helper function to read .parquet file into ArrayBuffer
async function readFileToArrayBuffer(filePath: string): Promise<ArrayBuffer> {
/**
* Helper function to read .parquet file into ArrayBuffer
*
* @param {string} filePath
* @returns {Promise<ArrayBuffer>}
*/
async function readFileToArrayBuffer(filePath) {
const buffer = await fs.readFile(filePath)
return buffer.buffer.slice(buffer.byteOffset, buffer.byteOffset + buffer.byteLength)
}