import { describe, expect, it } from 'vitest' import { isIso6346ContainerNumber, normalizeIso6346ContainerNumber } from './iso6346' describe('ISO 6346 container numbers', () => { it('normalizes whitespace and validates the equipment category and check digit', () => { expect(normalizeIso6346ContainerNumber(' mscu 663987 0 ')).toBe('MSCU6639870') expect(isIso6346ContainerNumber('MSCU6639870')).toBe(true) expect(isIso6346ContainerNumber('MSCA6639870')).toBe(false) expect(isIso6346ContainerNumber('MSCU6639871')).toBe(false) expect(isIso6346ContainerNumber('MSCU663987')).toBe(false) }) })