autocommit 20-05-2024-14-19
This commit is contained in:
parent
4985c46814
commit
8c0bbbcde4
|
|
@ -1,6 +1,7 @@
|
||||||
import '@testing-library/jest-dom'
|
import '@testing-library/jest-dom'
|
||||||
import pl from 'nodejs-polars'
|
import pl from 'nodejs-polars'
|
||||||
import { create_csv_database, add_row, print_head, delete_row_by_key, save_db } from '../app/database'
|
import { create_csv_database, add_row, print_head, delete_row_by_key, save_db } from '../app/database'
|
||||||
|
import { create_models } from '../app/model'
|
||||||
|
|
||||||
describe('DATABASE', () => {
|
describe('DATABASE', () => {
|
||||||
it('DATA', () => {
|
it('DATA', () => {
|
||||||
|
|
@ -28,6 +29,6 @@ describe('DATABASE', () => {
|
||||||
})
|
})
|
||||||
|
|
||||||
it('creates pos model', () => {
|
it('creates pos model', () => {
|
||||||
|
create_models()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ export function create_inventory_dataframe(inventories: Inventory[]): CSVDatabas
|
||||||
return create_csv_database(filepath, inventories)
|
return create_csv_database(filepath, inventories)
|
||||||
}
|
}
|
||||||
|
|
||||||
function create_models() {
|
export function create_models() {
|
||||||
const items: Item[] = [
|
const items: Item[] = [
|
||||||
{ id: '1', name: 'Item 1', price: 100 },
|
{ id: '1', name: 'Item 1', price: 100 },
|
||||||
{ id: '2', name: 'Item 2', price: 200 }
|
{ id: '2', name: 'Item 2', price: 200 }
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
itemId,quantity
|
||||||
|
1,50.0
|
||||||
|
2,30.0
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
id,name,price
|
||||||
|
1,Item 1,100.0
|
||||||
|
2,Item 2,200.0
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
id,itemId,quantity,timestamp
|
||||||
|
1,1,2.0,2024-05-20T04:18:40.595Z
|
||||||
|
2,2,1.0,2024-05-20T04:18:40.595Z
|
||||||
|
Loading…
Reference in New Issue