-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: improve the Settings (#364)
* refactor: rename the initial to initialize * refactor: remove the useless code * build: add @types/lodash into dependencies * feat: add the built-in editorOption * refactor: update built-in locales * refactor: update built-in colorTheme * fix(menubar): remove the optional for data property * refactor: remove the example code for Settings * refactor: improve the settingService * test: add unit tests for the SettingsService * refactor: remove useless await/async * build: move the @types/lodash to devDependencies
- Loading branch information
Showing
17 changed files
with
336 additions
and
241 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
src/services/__tests__/__snapshots__/settingsService.test.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Test the SettingsService Convert invalid object to JSON string 1`] = ` | ||
"SettingsService.toJSONString error: TypeError: Converting circular structure to JSON | ||
--> starting at object with constructor 'Object' | ||
| property 'b' -> object with constructor 'Object' | ||
--- property 'a' closes the circle" | ||
`; | ||
|
||
exports[`Test the SettingsService Normalize a invalid FlatObject 1`] = `"SettingsService.normalizeFlatJSONObject error: SyntaxError: Unexpected token ' in JSON at position 14"`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.