Skip to content

Commit bcc4c67

Browse files
committed
Update sample files and localization, remove quality audit
1 parent 1051167 commit bcc4c67

File tree

9 files changed

+450
-1012
lines changed

9 files changed

+450
-1012
lines changed

QUALITY_AUDIT.md

Lines changed: 0 additions & 687 deletions
This file was deleted.

coverage/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ <h1>All files</h1>
146146
<div class='footer quiet pad2 space-top1 center small'>
147147
Code coverage generated by
148148
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
149-
at 2025-10-13T23:00:57.621Z
149+
at 2025-10-14T04:29:52.120Z
150150
</div>
151151
<script src="prettify.js"></script>
152152
<script>

sample/README.md

Lines changed: 42 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ This directory contains sample files designed to demonstrate and test Dates-LE's
44

55
## 📁 Sample Files Overview
66

7-
| File | Format | Dates | Description |
8-
| ---------------------- | ------ | ----- | ------------------------------------------------ |
9-
| **api-response.json** | JSON | ~50 | API response with ISO 8601 timestamps, timezones |
10-
| **application.log** | LOG | ~50 | Application log with various timestamp formats |
11-
| **schedule.csv** | CSV | ~45 | Project schedule with date columns |
12-
| **config.yaml** | YAML | ~40 | Configuration file with date/time settings |
7+
| File | Format | Dates | Description |
8+
| --------------------- | ------ | ----- | ------------------------------------------------ |
9+
| **api-response.json** | JSON | ~50 | API response with ISO 8601 timestamps, timezones |
10+
| **application.log** | LOG | ~50 | Application log with various timestamp formats |
11+
| **schedule.csv** | CSV | ~45 | Project schedule with date columns |
12+
| **config.yaml** | YAML | ~40 | Configuration file with date/time settings |
1313

1414
**Total**: ~185 dates across 4 files demonstrating multiple date formats.
1515

@@ -79,6 +79,7 @@ This directory contains sample files designed to demonstrate and test Dates-LE's
7979
**Goal**: Verify date deduplication functionality.
8080

8181
**Steps**:
82+
8283
1. Open `api-response.json`
8384
2. Enable deduplication: `Settings → dates-le.dedupeEnabled: true`
8485
3. Run extraction
@@ -101,6 +102,7 @@ This directory contains sample files designed to demonstrate and test Dates-LE's
101102
**Goal**: Test safety warnings for large files.
102103

103104
**Steps**:
105+
104106
1. Create a copy of `application.log` and duplicate its contents 100x
105107
2. Open the large file
106108
3. Run extraction
@@ -112,6 +114,7 @@ This directory contains sample files designed to demonstrate and test Dates-LE's
112114
**Goal**: Verify side-by-side editor functionality.
113115

114116
**Steps**:
117+
115118
1. Enable: `Settings → dates-le.openResultsSideBySide: true`
116119
2. Open any sample file
117120
3. Run extraction
@@ -123,6 +126,7 @@ This directory contains sample files designed to demonstrate and test Dates-LE's
123126
**Goal**: Test automatic clipboard integration.
124127

125128
**Steps**:
129+
126130
1. Enable: `Settings → dates-le.copyToClipboardEnabled: true`
127131
2. Open `api-response.json`
128132
3. Run extraction
@@ -136,16 +140,19 @@ This directory contains sample files designed to demonstrate and test Dates-LE's
136140
**Test Sequence**:
137141

138142
**A. Silent Mode** (default):
143+
139144
- `Settings → dates-le.notificationsLevel: "silent"`
140145
- Run extraction on `api-response.json`
141146
- **Expected**: No notifications (except errors)
142147

143148
**B. Important Mode**:
149+
144150
- `Settings → dates-le.notificationsLevel: "important"`
145151
- Run extraction on very large file
146152
- **Expected**: Warnings only
147153

148154
**C. All Mode**:
155+
149156
- `Settings → dates-le.notificationsLevel: "all"`
150157
- Run extraction on `schedule.csv`
151158
- **Expected**: Success notification with count
@@ -155,42 +162,50 @@ This directory contains sample files designed to demonstrate and test Dates-LE's
155162
## 🔍 Edge Cases & Advanced Testing
156163

157164
### Empty File
165+
158166
- **Action**: Create empty file `empty.json`
159167
- **Expected**: No dates found, graceful handling
160168
- **Error**: None
161169

162170
### No Dates
171+
163172
```json
164173
{
165174
"name": "Test",
166175
"count": 42,
167176
"enabled": true
168177
}
169178
```
179+
170180
- **Expected**: "No dates found" message
171181
- **Error**: None
172182

173183
### Invalid JSON/YAML/CSV
184+
174185
```json
175186
{
176187
"broken": "json"
177188
"missing": "comma"
178189
}
179190
```
191+
180192
- **Expected**: Parse error (if `showParseErrors` enabled)
181193
- **Error**: Graceful error handling, no crash
182194

183195
### Mixed Valid/Invalid Dates
196+
184197
- **File**: Create JSON with mix of valid ISO dates and invalid strings
185198
- **Expected**: Only valid dates extracted
186199
- **Error**: None (invalid dates skipped)
187200

188201
### Very Large Output
202+
189203
- **Action**: Create file with 100,000+ dates
190204
- **Expected**: Warning before opening results
191205
- **Prompt**: "Output size (100,000 lines) exceeds threshold. Continue?"
192206

193207
### Timezone Edge Cases
208+
194209
```json
195210
{
196211
"utc": "2025-10-13T12:00:00Z",
@@ -199,55 +214,66 @@ This directory contains sample files designed to demonstrate and test Dates-LE's
199214
"no_timezone": "2025-10-13T12:00:00"
200215
}
201216
```
217+
202218
- **Expected**: All dates extracted with timezone info preserved
203219

204220
### Date Ranges
221+
205222
```yaml
206223
maintenance:
207-
start: "2025-10-14T02:00:00Z"
208-
end: "2025-10-14T04:00:00Z"
224+
start: '2025-10-14T02:00:00Z'
225+
end: '2025-10-14T04:00:00Z'
209226
```
227+
210228
- **Expected**: Both dates extracted separately
211229
212230
### Null Dates
231+
213232
```json
214233
{
215234
"shippedDate": null,
216235
"deliveredDate": null
217236
}
218237
```
238+
219239
- **Expected**: Null dates ignored (not extracted)
220240

221241
### String Dates vs Numeric Timestamps
242+
222243
```json
223244
{
224245
"isoString": "2025-10-13T12:00:00Z",
225246
"unixTimestamp": 1728824400000,
226247
"version": "1.0.0"
227248
}
228249
```
250+
229251
- **Expected**: ISO string extracted, numbers (version/timestamp) may be filtered
230252

231253
---
232254

233255
## ⚡ Performance Testing Guidelines
234256

235257
### Small Files (< 1KB)
258+
236259
- **Test File**: Create minimal JSON with 5 dates
237260
- **Expected**: < 100ms extraction time
238261
- **Verify**: No performance warnings
239262

240263
### Medium Files (1KB - 1MB)
264+
241265
- **Test Files**: All provided samples
242266
- **Expected**: < 1 second extraction time
243267
- **Verify**: Smooth, responsive extraction
244268

245269
### Large Files (1MB - 50MB)
270+
246271
- **Action**: Duplicate `application.log` 100x
247272
- **Expected**: < 5 seconds extraction time
248273
- **Verify**: Progress indicator shown
249274

250275
### Very Large Files (> 50MB)
276+
251277
- **Action**: Create/open file exceeding safety threshold
252278
- **Expected**: Safety warning before processing
253279
- **Verify**: Can cancel operation
@@ -259,12 +285,14 @@ maintenance:
259285
### No Dates Extracted
260286

261287
**Possible Causes**:
288+
262289
1. File format not supported (only JSON, YAML, CSV)
263290
2. File not saved with correct extension
264291
3. No valid date formats in file
265292
4. Parse error (enable `showParseErrors`)
266293

267294
**Solution**:
295+
268296
- Check file extension (.json, .yaml, .yml, .csv)
269297
- Verify file contains valid date strings
270298
- Check Output panel → "Dates-LE" for errors
@@ -274,6 +302,7 @@ maintenance:
274302
**Symptoms**: Slow extraction, high memory usage
275303

276304
**Solutions**:
305+
277306
1. Enable safety warnings: `dates-le.safety.enabled: true`
278307
2. Reduce file size threshold: `dates-le.safety.fileSizeWarnBytes: 500000`
279308
3. Split large files into smaller chunks
@@ -284,6 +313,7 @@ maintenance:
284313
**Example**: Expected 50 dates, got 48
285314

286315
**Debugging**:
316+
287317
1. Check if deduplication is enabled
288318
2. Verify date formats are recognized
289319
3. Look for null values or invalid formats
@@ -306,19 +336,22 @@ maintenance:
306336
These sample files comprehensively test:
307337

308338
**Date Formats**:
339+
309340
- ISO 8601 (various precisions)
310341
- RFC 2822
311342
- Simple dates (YYYY-MM-DD)
312343
- DateTime strings (YYYY-MM-DD HH:MM:SS)
313344
- Unix timestamps
314345

315346
**File Formats**:
347+
316348
- JSON (nested structures, arrays)
317349
- YAML (configurations, hierarchies)
318350
- CSV (tabular data)
319351
- LOG (mixed formats)
320352

321353
**Edge Cases**:
354+
322355
- Null values
323356
- Timezones (UTC, offsets)
324357
- Millisecond precision
@@ -327,6 +360,7 @@ These sample files comprehensively test:
327360
- Empty files
328361

329362
**Features**:
363+
330364
- Deduplication
331365
- Sorting
332366
- Side-by-side view
@@ -339,4 +373,3 @@ These sample files comprehensively test:
339373
**Happy Testing!** 🚀
340374

341375
If you discover any issues or have suggestions for additional test cases, please [open an issue](https://github.com/nolindnaidoo/dates-le/issues).
342-

0 commit comments

Comments
 (0)