1
+ // eslint-disable-next-line @eslint-community/eslint-comments/disable-enable-pair
2
+ /* eslint-disable no-console */
1
3
import assert from 'node:assert' ;
2
4
import { describe , it } from 'node:test' ;
3
5
import Debug from 'debug' ;
6
+ import { extractInventoryImportErrors } from '../advanced.js' ;
4
7
import { fasterCsvReportOptions , parseFasterCsvReport } from '../csvReports.js' ;
5
8
import { DEBUG_ENABLE_NAMESPACES } from '../debug.config.js' ;
6
9
Debug . enable ( DEBUG_ENABLE_NAMESPACES ) ;
7
10
await describe ( 'node-faster-report-parser/csv' , async ( ) => {
8
- await it ( 'Parses "W200S - Inventory Summary Report"' , async ( ) => {
11
+ await it . skip ( 'Parses "W200S - Inventory Summary Report"' , async ( ) => {
9
12
const results = await parseFasterCsvReport ( './samples/w200s.csv' , fasterCsvReportOptions . w200s ) ;
10
13
console . log ( results . data [ 0 ] ) ;
11
14
assert ( results . data . length > 0 ) ;
12
15
console . log ( results . parameters ) ;
13
16
console . log ( results . version ) ;
14
17
} ) ;
15
- await it ( 'Parses "W223 - Inventory Transaction Details Report"' , async ( ) => {
18
+ await it . skip ( 'Parses "W223 - Inventory Transaction Details Report"' , async ( ) => {
16
19
const results = await parseFasterCsvReport ( './samples/w223.csv' , fasterCsvReportOptions . w223 ) ;
17
20
console . log ( results . data [ 0 ] ) ;
18
21
assert ( results . data . length > 0 ) ;
19
22
console . log ( results . parameters ) ;
20
23
console . log ( results . version ) ;
21
24
} ) ;
22
- await it ( 'Parses "W235 - Inventory Snapshot"' , async ( ) => {
25
+ await it . skip ( 'Parses "W235 - Inventory Snapshot"' , async ( ) => {
23
26
const results = await parseFasterCsvReport ( './samples/w235.csv' , fasterCsvReportOptions . w235 ) ;
24
27
console . log ( results . data [ 0 ] ) ;
25
28
assert ( results . data . length > 0 ) ;
26
29
console . log ( results . parameters ) ;
27
30
console . log ( results . version ) ;
28
31
} ) ;
29
- await it ( 'Parses "W600 - Pick List Values Report"' , async ( ) => {
32
+ await it . skip ( 'Parses "W600 - Pick List Values Report"' , async ( ) => {
30
33
const results = await parseFasterCsvReport ( './samples/w600.csv' , fasterCsvReportOptions . w600 ) ;
31
34
console . log ( results . data [ 0 ] ) ;
32
35
assert ( results . data . length > 0 ) ;
@@ -39,5 +42,8 @@ await describe('node-faster-report-parser/csv', async () => {
39
42
assert ( results . data . length > 0 ) ;
40
43
console . log ( results . parameters ) ;
41
44
console . log ( results . version ) ;
45
+ const iiuErrors = extractInventoryImportErrors ( results . data ) ;
46
+ console . log ( iiuErrors ) ;
47
+ assert ( iiuErrors . length > 0 ) ;
42
48
} ) ;
43
49
} ) ;
0 commit comments