Files
ihaleist/tests/il-plaka.test.mjs

13 lines
516 B
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import test from 'node:test';
import assert from 'node:assert/strict';
import { IL_PLAKA } from '../server/il-plaka.mjs';
test('canonical province map covers all 81 Turkish plate codes', () => {
const codes = Object.keys(IL_PLAKA).map(Number).sort((a, b) => a - b);
assert.deepEqual(codes, Array.from({ length: 81 }, (_, index) => index + 1));
assert.equal(IL_PLAKA[28], 'Giresun');
assert.equal(IL_PLAKA[68], 'Aksaray');
assert.equal(IL_PLAKA[76], 'Iğdır');
assert.equal(IL_PLAKA[81], 'Düzce');
});