import '@testing-library/jest-dom'
import pl from 'nodejs-polars'
import { test_x, create_csv_database, add_row, print_head, delete_row_by_key, save_db } from '../app/database'

describe('DATABASE', () => {
  it('DATA', () => {
    test_x()
  })

  it('create csv', () => {
    let res = create_csv_database('csv_db/x.csv')
    print_head(res)

    add_row(res, { "a_key": ["x"], "a_value": ["y"] })
    print_head(res)

    save_db(res)

    delete_row_by_key(res, "x")
    print_head(res)
  })
})
