@@ -79,42 +79,63 @@ void main() {
79
79
final globalSettings = eg.globalStore (boolGlobalSettings: {}).settings;
80
80
check (globalSettings).getBool (BoolGlobalSetting .placeholderIgnore)
81
81
.isFalse ();
82
+ check (globalSettings).getBool (BoolGlobalSetting .renderKatex)
83
+ .isFalse ();
82
84
assert (! BoolGlobalSetting .placeholderIgnore.default_);
85
+ assert (! BoolGlobalSetting .renderKatex.default_);
83
86
});
84
87
85
88
test ('get from initial load' , () {
86
89
final globalSettings = eg.globalStore (boolGlobalSettings: {
87
90
BoolGlobalSetting .placeholderIgnore: true ,
91
+ BoolGlobalSetting .renderKatex: true ,
88
92
}).settings;
89
93
check (globalSettings).getBool (BoolGlobalSetting .placeholderIgnore)
90
94
.isTrue ();
95
+ check (globalSettings).getBool (BoolGlobalSetting .renderKatex)
96
+ .isTrue ();
91
97
});
92
98
93
99
test ('set, get' , () async {
94
100
final globalSettings = eg.globalStore (boolGlobalSettings: {}).settings;
95
101
check (globalSettings).getBool (BoolGlobalSetting .placeholderIgnore)
96
102
.isFalse ();
103
+ check (globalSettings).getBool (BoolGlobalSetting .renderKatex)
104
+ .isFalse ();
97
105
98
106
await globalSettings.setBool (BoolGlobalSetting .placeholderIgnore, true );
107
+ await globalSettings.setBool (BoolGlobalSetting .renderKatex, true );
99
108
check (globalSettings).getBool (BoolGlobalSetting .placeholderIgnore)
100
109
.isTrue ();
110
+ check (globalSettings).getBool (BoolGlobalSetting .renderKatex)
111
+ .isTrue ();
101
112
102
113
await globalSettings.setBool (BoolGlobalSetting .placeholderIgnore, false );
114
+ await globalSettings.setBool (BoolGlobalSetting .renderKatex, false );
103
115
check (globalSettings).getBool (BoolGlobalSetting .placeholderIgnore)
104
116
.isFalse ();
117
+ check (globalSettings).getBool (BoolGlobalSetting .renderKatex)
118
+ .isFalse ();
105
119
});
106
120
107
121
test ('set to null -> revert to default' , () async {
108
122
final globalSettings = eg.globalStore (boolGlobalSettings: {
109
123
BoolGlobalSetting .placeholderIgnore: true ,
124
+ BoolGlobalSetting .renderKatex: true ,
110
125
}).settings;
111
126
check (globalSettings).getBool (BoolGlobalSetting .placeholderIgnore)
112
127
.isTrue ();
128
+ check (globalSettings).getBool (BoolGlobalSetting .renderKatex)
129
+ .isTrue ();
113
130
114
131
await globalSettings.setBool (BoolGlobalSetting .placeholderIgnore, null );
132
+ await globalSettings.setBool (BoolGlobalSetting .renderKatex, null );
115
133
check (globalSettings).getBool (BoolGlobalSetting .placeholderIgnore)
116
134
.isFalse ();
135
+ check (globalSettings).getBool (BoolGlobalSetting .renderKatex)
136
+ .isFalse ();
117
137
assert (! BoolGlobalSetting .placeholderIgnore.default_);
138
+ assert (! BoolGlobalSetting .renderKatex.default_);
118
139
});
119
140
});
120
141
}
0 commit comments