Skip to content

Commit 7e4ae91

Browse files
committed
refactor: - add include field to settings
1 parent 9990bcc commit 7e4ae91

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/Config/Settings.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ export const TASK_FORMATS = {
6161
export type TASK_FORMATS = typeof TASK_FORMATS; // For convenience to make some typing easier
6262

6363
export interface Settings {
64+
include: Record<string, string>;
6465
globalQuery: string;
6566
globalFilter: string;
6667
removeGlobalFilter: boolean;
@@ -96,6 +97,7 @@ export interface Settings {
9697
}
9798

9899
const defaultSettings: Settings = {
100+
include: {},
99101
globalQuery: '',
100102
globalFilter: '',
101103
removeGlobalFilter: false,

tests/Scripting/Includes.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { getSettings } from '../../src/Config/Settings';
12
import { Query } from '../../src/Query/Query';
23
import { TasksFile } from '../../src/Scripting/TasksFile';
34

@@ -11,3 +12,11 @@ describe('include tests', () => {
1112
expect(query.filters[0].statement.anyPlaceholdersExpanded).toEqual('not done');
1213
});
1314
});
15+
16+
describe('include settings tests', () => {
17+
it('should have an empty include field', () => {
18+
const settings = getSettings();
19+
20+
expect(settings.include).toEqual({});
21+
});
22+
});

0 commit comments

Comments
 (0)