Skip to content

Commit a47b798

Browse files
committed
Add quickPickEscBehavior and dateTemplate to default settings
1 parent c19af8b commit a47b798

File tree

2 files changed

+41
-39
lines changed

2 files changed

+41
-39
lines changed

src/test/spec/defaultSettings.ts

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,28 @@
1-
import * as vscode from 'vscode';
2-
3-
/**
4-
* Helper function to set all settings to default values before each test
5-
*/
6-
export const setSettingsToDefault = async () => {
7-
const extensionName = 'markdown-checkbox';
8-
const defaultSettings = {
9-
checkmark: 'X',
10-
languages: ['markdown'],
11-
withBulletPoint: true,
12-
typeOfBulletPoint: '*',
13-
strikeThroughWhenChecked: true,
14-
italicWhenChecked: true,
15-
dateWhenChecked: true,
16-
showStatusBarItem: true,
17-
dateFormat: 'YYYY-MM-DD',
18-
};
19-
await Promise.all(
20-
Object.entries(defaultSettings).map(async ([key, value]) => {
21-
return await vscode.workspace
22-
.getConfiguration(extensionName)
23-
.update(key, value);
24-
})
25-
);
26-
};
1+
import * as vscode from 'vscode';
2+
3+
/**
4+
* Helper function to set all settings to default values before each test
5+
*/
6+
export const setSettingsToDefault = async () => {
7+
const extensionName = 'markdown-checkbox';
8+
const defaultSettings = {
9+
checkmark: 'X',
10+
languages: ['markdown'],
11+
withBulletPoint: true,
12+
typeOfBulletPoint: '*',
13+
strikeThroughWhenChecked: true,
14+
italicWhenChecked: true,
15+
dateWhenChecked: true,
16+
showStatusBarItem: true,
17+
dateFormat: 'YYYY-MM-DD',
18+
dateTemplate: '[{date}]',
19+
quickPickEscBehavior: 'doNothing',
20+
};
21+
await Promise.all(
22+
Object.entries(defaultSettings).map(async ([key, value]) => {
23+
return await vscode.workspace
24+
.getConfiguration(extensionName)
25+
.update(key, value);
26+
})
27+
);
28+
};
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
{
2-
"markdown-checkbox.checkmark": "X",
3-
"markdown-checkbox.languages": [
4-
"markdown"
5-
],
6-
"markdown-checkbox.withBulletPoint": true,
7-
"markdown-checkbox.typeOfBulletPoint": "*",
8-
"markdown-checkbox.strikeThroughWhenChecked": true,
9-
"markdown-checkbox.italicWhenChecked": true,
10-
"markdown-checkbox.dateWhenChecked": true,
11-
"markdown-checkbox.showStatusBarItem": true,
12-
"markdown-checkbox.dateFormat": "YYYY-MM-DD"
13-
}
1+
{
2+
"markdown-checkbox.checkmark": "X",
3+
"markdown-checkbox.languages": ["markdown"],
4+
"markdown-checkbox.withBulletPoint": true,
5+
"markdown-checkbox.typeOfBulletPoint": "*",
6+
"markdown-checkbox.strikeThroughWhenChecked": true,
7+
"markdown-checkbox.italicWhenChecked": true,
8+
"markdown-checkbox.dateWhenChecked": true,
9+
"markdown-checkbox.showStatusBarItem": true,
10+
"markdown-checkbox.dateFormat": "YYYY-MM-DD",
11+
"markdown-checkbox.dateTemplate": "[{date}]",
12+
"markdown-checkbox.quickPickEscBehavior": "doNothing"
13+
}

0 commit comments

Comments
 (0)