feat(package): modernize package metadata, exports, and typed country dataset coverage
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { expect, tap } from '@git.zone/tstest/tapbundle';
|
||||
import * as smarti18n from '../ts/index.js';
|
||||
|
||||
tap.test('should expose country code records', async () => {
|
||||
expect(smarti18n.countryCodeArray.length).toBeGreaterThan(200);
|
||||
});
|
||||
|
||||
tap.test('should include Germany with phone prefix', async () => {
|
||||
const germany = smarti18n.countryCodeArray.find((countryArg) => countryArg.code === 'DE');
|
||||
|
||||
expect(germany?.name).toEqual('Germany');
|
||||
expect(germany?.phonePrefix).toEqual('49');
|
||||
});
|
||||
|
||||
export default tap.start();
|
||||
@@ -1,8 +0,0 @@
|
||||
import { expect, expectAsync, tap } from '@push.rocks/tapbundle';
|
||||
import * as smarti18n from '../ts/index.js'
|
||||
|
||||
tap.test('first test', async () => {
|
||||
console.log(smarti18n)
|
||||
})
|
||||
|
||||
tap.start()
|
||||
Reference in New Issue
Block a user