- Rename all source files from npmextra.* to simpler names (classes.appdata.ts, etc.) - Rename Npmextra class to Smartconfig - Config file changed from npmextra.json to smartconfig.json - KV store path changed from ~/.npmextra/kv to ~/.smartconfig/kv - Update all imports, tests, and metadata
27 lines
491 B
TypeScript
27 lines
491 B
TypeScript
import { expect, tap } from '@git.zone/tstest/tapbundle';
|
|
|
|
// module to test
|
|
import * as smartconfig from '../ts/index.js';
|
|
|
|
interface ITestOptions {
|
|
hi: string;
|
|
deep: {
|
|
deep1: string;
|
|
deep2: string;
|
|
};
|
|
}
|
|
|
|
let testAppdata: smartconfig.AppData<ITestOptions>;
|
|
|
|
tap.test('should create a valid AppData', async () => {
|
|
testAppdata = new smartconfig.AppData<ITestOptions>({
|
|
envMapping: {
|
|
deep: {
|
|
deep1: '',
|
|
},
|
|
},
|
|
});
|
|
});
|
|
|
|
export default tap.start();
|