mirror of
https://github.com/asadbek064/hyparquet.git
synced 2026-01-04 10:36:37 +00:00
JS tests
This commit is contained in:
parent
6616c2f7af
commit
58974da324
@ -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)
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user