feat(admin): bind booking documents and truck containers

This commit is contained in:
2026-08-31 19:54:37 +08:00
parent 0f4f635686
commit a759eb1b6b
24 changed files with 691 additions and 179 deletions
+12
View File
@@ -0,0 +1,12 @@
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)
})
})