A useful checkout checklist names an input, the observation it should produce and the layer responsible for it. “Test validation” is too vague: stripping a letter, losing a leading zero or treating an unavailable AVS check as a pass can all hide behind a green check mark.
Run the shared baseline first
Download the data-tool test project , extract it and run:
node --test data-tools.test.mjs
node fixture-demo.mjs > fixture.json
Use Node.js 22 or later. There are no package installs, credentials or network calls. data-tool-cases.json contains fixed inputs and expected states; the test file also exercises generators and export boundaries. For detailed card-number profile vectors, the card validator provides its companion validation bundle.
The following test loops read the downloadable cases rather than repeating values in prose and executable code independently:
for (const row of cases.iban) test('IBAN: ' + row.id, () => assert.equal(inspectIban(row.input, ibans).status, row.expected));
for (const row of cases.securityCodes) test('CVV: ' + row.id, () => assert.equal(inspectSecurityCode(row.value, row.length), row.valid));
for (const row of cases.avs) test('AVS: ' + row.id, () => assert.deepEqual(describeAvs(row.response), row.expected));
for (const row of cases.expiry) test('expiry: ' + row.id, () => assert.equal(expiryState(row.month, row.year, row.date), row.expected));Input, result and policy are separate
| Test input or interaction | Expected observation | Shared check or tool |
|---|---|---|
Prefix 00-1234 | Normalized prefix is the string 001234 | prefixBatch; prefix generator |
Prefix 51x or pasted line break | Character error, not repaired to 51 | Prefix rejection cases |
Generate on 4, edit to 51, export without regenerating | Old batch retains prefix: "4" | Snapshot test and browser check |
Current-month expiry 11/2026, reference 2026-11-30 | Current-or-future | expiryState fixed cases |
Previous month 10/2026, same reference | Expired | expiryState fixed cases |
"003" at width 3, then switch to width 4 | Pass, then fail without padding | security-code fixtures |
AVS line pass, postcode fail | Two distinct observations | describeAvs cases |
| Missing AVS fields | unknown, not approval | Missing-response case |
| German IBAN containing a letter but passing MOD-97 | BBAN error | IBAN format tool |
| 19-digit card number and leading-zero code in CSV | Exact text preserved in the file | Export test; import columns as text |
For card fields, check normalization, possible network, supported length and checksum separately. An incomplete or unknown prefix is not proof of an invalid account. A checksum failure is not, by itself, a universal instruction to block or allow submission. After the observation tests pass, add tests for your chosen form and provider policy: what message appears, whether submission is enabled and where the error is returned.
Address and AVS checks
The identity fixture tool labels addresses as format-only and omits phones where its profile lacks verified examples. Test empty phone, Unicode names and postcodes such as 0800 and 01067 without numeric conversion. A local street/postcode pair does not establish deliverability or an issuer billing match.
Keep pass, fail, unavailable, unchecked and unknown separate in response-handling tests. Then test the merchant decision that consumes them. A provider’s AVS result and its authorization result can be distinct. Use your sandbox’s documented response controls; a generated address cannot force a real AVS match.
Browser checks the unit suite cannot prove
Use a narrow viewport and keyboard navigation for each of these observations:
- The first useful control appears without several screens of introductory prose. Controls and copy buttons have at least a 44-pixel target in these tools.
- Every input has a persistent label. Error and result text is announced without depending on color alone.
- Invalid text remains available to correct; moving between fields does not erase it silently.
- Long result strings wrap inside their container. JSON/CSV previews scroll internally without widening the page.
- Clipboard success is reported only after the clipboard call succeeds; a denial gives a manual-copy instruction.
- A settings edit does not change the metadata attached to an older result set.
- The card preview retains full long and RTL names, uses Amex/Diners grouping and exports the chosen side with its watermark.
Also test browser zoom, focus visibility, screen-reader order and your supported touch keyboards. A desktop screenshot and a unit test do not establish those behaviors across devices.
Provider flows need different fixtures
Use the sandbox test-card reference for approvals, declines, retries and authentication. Test cancellation, timeouts and a duplicate submit without assuming a locally valid number implies an approved transaction. Keep provider calls out of the offline suite so a networking failure does not look like a failed formatter.
For longer-running datasets, the test-data management guide supplies the replay manifest and versioning workflow. Record the bundle version, reference date and expected result with a failing case; a bare random number is not enough to reproduce the problem.
Updated 8 November 2026: the checklist now uses shared executable cases and no longer prescribes universal acceptance rules for Luhn failures or unknown prefixes.