fix(appdata): Fix iteration over overwriteObject in AppData and update configuration for dependency and path handling
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"testTool":{
|
||||
"testValue":2
|
||||
}
|
||||
}
|
||||
"testTool": {
|
||||
"testValue": 2
|
||||
}
|
||||
}
|
||||
|
@@ -1,5 +1,4 @@
|
||||
import { expect, tap } from '@push.rocks/tapbundle';
|
||||
import path = require('path');
|
||||
import { expect, tap } from '@git.zone/tstest/tapbundle';
|
||||
|
||||
// module to test
|
||||
import * as npmextra from '../ts/index.js';
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { expect, tap } from '@push.rocks/tapbundle';
|
||||
import { expect, tap } from '@git.zone/tstest/tapbundle';
|
||||
|
||||
import * as npmextra from '../ts/index.js';
|
||||
|
||||
@@ -29,4 +29,4 @@ tap.test('expect to add an object to the kv Store', async () => {
|
||||
await expect(await myKeyValueStore.readKey('myKey')).toEqual('myValue');
|
||||
});
|
||||
|
||||
tap.start();
|
||||
export default tap.start();
|
||||
|
16
test/test.ts
16
test/test.ts
@@ -1,5 +1,4 @@
|
||||
import { expect, tap } from '@push.rocks/tapbundle';
|
||||
import path = require('path');
|
||||
import { expect, tap } from '@git.zone/tstest/tapbundle';
|
||||
|
||||
// module to test
|
||||
import * as npmextra from '../ts/index.js';
|
||||
@@ -16,11 +15,14 @@ tap.test('should state wether a npmextra.json exists', async () => {
|
||||
expect(testNpmextra.npmextraJsonExists).toBeTrue();
|
||||
});
|
||||
|
||||
tap.test('should pass through default value, if not overriden by config from file', async () => {
|
||||
let testData = testNpmextra.dataFor('testTool', { someKey2: 'someValue2' });
|
||||
console.log(testData);
|
||||
expect(testData).toHaveProperty('someKey2');
|
||||
});
|
||||
tap.test(
|
||||
'should pass through default value, if not overriden by config from file',
|
||||
async () => {
|
||||
let testData = testNpmextra.dataFor('testTool', { someKey2: 'someValue2' });
|
||||
console.log(testData);
|
||||
expect(testData).toHaveProperty('someKey2');
|
||||
},
|
||||
);
|
||||
|
||||
tap.test('should read a config file', async () => {
|
||||
let testData = testNpmextra.dataFor<any>('testTool', {
|
||||
|
Reference in New Issue
Block a user