mirror of
https://github.com/DaanVandenBosch/phantasmal-world.git
synced 2025-04-04 22:58:29 +08:00
Fixed bug in try_finally and LogStore.
This commit is contained in:
parent
b7c57744df
commit
a0361fdc7c
@ -1,5 +1,114 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`Renders correctly with a current quest.: should render property inputs 1`] = `
|
||||
<div
|
||||
class="quest_editor_QuestInfoView"
|
||||
tabindex="-1"
|
||||
>
|
||||
<table>
|
||||
<tr>
|
||||
<th>
|
||||
Episode:
|
||||
</th>
|
||||
<td>
|
||||
I
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
ID:
|
||||
</th>
|
||||
<td>
|
||||
<span
|
||||
class="core_NumberInput core_Input"
|
||||
>
|
||||
<input
|
||||
class="core_NumberInput_inner core_Input_inner"
|
||||
min="0"
|
||||
step="1"
|
||||
type="number"
|
||||
/>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Name:
|
||||
</th>
|
||||
<td>
|
||||
<span
|
||||
class="core_TextInput core_Input"
|
||||
>
|
||||
<input
|
||||
class="core_TextInput_inner core_Input_inner"
|
||||
maxlength="32"
|
||||
type="text"
|
||||
/>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th
|
||||
colspan="2"
|
||||
>
|
||||
Short description:
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td
|
||||
colspan="2"
|
||||
>
|
||||
<div
|
||||
class="core_TextArea"
|
||||
>
|
||||
<textarea
|
||||
class="core_TextArea_inner"
|
||||
cols="25"
|
||||
maxlength="128"
|
||||
rows="5"
|
||||
style="font-family: \\"Courier New\\", monospace;"
|
||||
/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th
|
||||
colspan="2"
|
||||
>
|
||||
Long description:
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td
|
||||
colspan="2"
|
||||
>
|
||||
<div
|
||||
class="core_TextArea"
|
||||
>
|
||||
<textarea
|
||||
class="core_TextArea_inner"
|
||||
cols="25"
|
||||
maxlength="288"
|
||||
rows="10"
|
||||
style="font-family: \\"Courier New\\", monospace;"
|
||||
/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div
|
||||
class="quest_editor_UnavailableView"
|
||||
hidden=""
|
||||
>
|
||||
<label
|
||||
class="core_Label disabled"
|
||||
>
|
||||
No quest loaded.
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`Renders correctly without a current quest.: should render a "No quest loaded." view 1`] = `
|
||||
<div
|
||||
class="quest_editor_QuestInfoView"
|
||||
|
@ -84,8 +84,11 @@ export class LogStore extends Store {
|
||||
|
||||
for (let i = 0; i < len; i++) {
|
||||
const entry = buffered_entries[i];
|
||||
const logger_name = buffered_logger_names[i];
|
||||
LogManager.default_handler(entry, logger_name);
|
||||
|
||||
if (entry.severity >= LogManager.default_severity) {
|
||||
const logger_name = buffered_logger_names[i];
|
||||
LogManager.default_handler(entry, logger_name);
|
||||
}
|
||||
}
|
||||
|
||||
// Occasionally clean up old log messages if there are too many.
|
||||
|
@ -27,7 +27,7 @@ export function pw_test(
|
||||
LogManager.default_severity = max_log_severity + 1;
|
||||
LogManager.default_handler = entry => log.push(entry.message);
|
||||
|
||||
try_finally(
|
||||
return try_finally(
|
||||
() => f(disposer),
|
||||
() => {
|
||||
disposer.dispose();
|
||||
|
Loading…
Reference in New Issue
Block a user