3
3
import assert from 'node:assert' ;
4
4
import { describe , it } from 'node:test' ;
5
5
import { isValidDateString , isValidTimeString } from '@cityssm/utils-datetime' ;
6
- import { parseW114ExcelReport , parseW200ExcelReport , parseW217ExcelReport , parseW223ExcelReport , parseW311ExcelReport , parseW604ExcelReport , w114ReportName , w200ReportName , w217ReportName , w223ReportName , w311ReportName , w604ReportName } from '../xlsxReports.js' ;
6
+ import { parseW114ExcelReport , parseW200ExcelReport , parseW201ExcelReport , parseW217ExcelReport , parseW223ExcelReport , parseW311ExcelReport , parseW604ExcelReport , w114ReportName , w200ReportName , w201ReportName , w217ReportName , w223ReportName , w311ReportName , w604ReportName } from '../xlsxReports.js' ;
7
7
await describe ( 'node-faster-report-parser/xlsx' , async ( ) => {
8
8
// eslint-disable-next-line @cspell/spellchecker
9
- await it ( 'Parses "W114 - Asset Master List"' , ( ) => {
9
+ await it . skip ( 'Parses "W114 - Asset Master List"' , ( ) => {
10
10
// eslint-disable-next-line @cspell/spellchecker
11
11
const results = parseW114ExcelReport ( './samples/w114_assetMasterList.xlsx' ) ;
12
12
console . log ( results ) ;
@@ -20,7 +20,7 @@ await describe('node-faster-report-parser/xlsx', async () => {
20
20
assert . notStrictEqual ( asset . assetNumber , '' ) ;
21
21
}
22
22
} ) ;
23
- await it ( 'Parses "W200 - Inventory Report"' , ( ) => {
23
+ await it . skip ( 'Parses "W200 - Inventory Report"' , ( ) => {
24
24
const results = parseW200ExcelReport ( './samples/w200.xlsx' ) ;
25
25
console . log ( results ) ;
26
26
assert . strictEqual ( results . reportName , w200ReportName ) ;
@@ -39,7 +39,15 @@ await describe('node-faster-report-parser/xlsx', async () => {
39
39
}
40
40
}
41
41
} ) ;
42
- await it ( 'Parses "W217 - Direct Charge Transactions"' , ( ) => {
42
+ await it ( 'Parses "W201 - Inventory Item Issue Report"' , ( ) => {
43
+ const results = parseW201ExcelReport ( './samples/w201_inventoryItemIssueReport.xlsx' ) ;
44
+ console . log ( results ) ;
45
+ assert . strictEqual ( results . reportName , w201ReportName ) ;
46
+ assert ( isValidDateString ( results . exportDate ) ) ;
47
+ assert ( isValidTimeString ( results . exportTime ) ) ;
48
+ assert ( results . data . length > 0 ) ;
49
+ } ) ;
50
+ await it . skip ( 'Parses "W217 - Direct Charge Transactions"' , ( ) => {
43
51
const results = parseW217ExcelReport ( './samples/w217_directChargeTransactions.xlsx' ) ;
44
52
// console.log(results)
45
53
assert . strictEqual ( results . reportName , w217ReportName ) ;
@@ -61,7 +69,7 @@ await describe('node-faster-report-parser/xlsx', async () => {
61
69
}
62
70
}
63
71
} ) ;
64
- await describe ( 'W223 - Inventory Transaction Details Report' , async ( ) => {
72
+ await describe . skip ( 'W223 - Inventory Transaction Details Report' , async ( ) => {
65
73
await it ( 'Parses with page breaks' , ( ) => {
66
74
const results = parseW223ExcelReport ( './samples/w223_inventoryTransactionDetails.xlsx' , {
67
75
inverseAmounts : true
@@ -126,7 +134,7 @@ await describe('node-faster-report-parser/xlsx', async () => {
126
134
}
127
135
} ) ;
128
136
} ) ;
129
- await it ( 'Parses "W311 - Active Work Orders by Shop"' , ( ) => {
137
+ await it . skip ( 'Parses "W311 - Active Work Orders by Shop"' , ( ) => {
130
138
const results = parseW311ExcelReport ( './samples/w311_activeWorkOrdersByShop.xlsx' ) ;
131
139
// console.log(JSON.stringify(results, undefined, 2))
132
140
assert . strictEqual ( results . reportName , w311ReportName ) ;
@@ -136,7 +144,7 @@ await describe('node-faster-report-parser/xlsx', async () => {
136
144
assert ( ( results . data . at ( 0 ) ?. workOrders . length ?? 0 ) > 0 ) ;
137
145
assert ( ( results . data . at ( 0 ) ?. workOrders . at ( 0 ) ?. repairs . length ?? 0 ) > 0 ) ;
138
146
} ) ;
139
- await it ( 'Parses "W604 - Integration Log Viewer"' , ( ) => {
147
+ await it . skip ( 'Parses "W604 - Integration Log Viewer"' , ( ) => {
140
148
const results = parseW604ExcelReport ( './samples/w604_integrationLogViewer.xlsx' ) ;
141
149
// console.log(JSON.stringify(results, undefined, 2))
142
150
assert . strictEqual ( results . reportName , w604ReportName ) ;
0 commit comments