Skip to content

Commit b7e06a8

Browse files
committed
test: - Better way of avoiding accidental changes to docs
1 parent d1c06c2 commit b7e06a8

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

tests/Renderer/QueryResultsRenderer.test.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,21 @@ describe('QueryResultsRenderer tests', () => {
101101
});
102102

103103
it('fully populated task', async () => {
104-
// The approved file from this test is embedded in the user documentation.
104+
// The approved file from this test is embedded in the user documentation,
105+
// so we ignore any GlobalQuery, to avoid accidental changes to the docs:
106+
GlobalQuery.getInstance().reset();
107+
105108
const allTasks = [TaskBuilder.createFullyPopulatedTask()];
106-
await verifyRenderedTasksHTML(allTasks, 'show toolbar\nshow urgency');
109+
await verifyRenderedTasksHTML(allTasks, 'show urgency');
107110
});
108111

109112
it('fully populated task - short mode', async () => {
110-
// The approved file from this test is embedded in the user documentation.
113+
// The approved file from this test is embedded in the user documentation,
114+
// so we ignore any GlobalQuery, to avoid accidental changes to the docs:
115+
GlobalQuery.getInstance().reset();
116+
111117
const allTasks = [TaskBuilder.createFullyPopulatedTask()];
112-
await verifyRenderedTasksHTML(allTasks, 'show toolbar\nshow urgency\nshort mode');
118+
await verifyRenderedTasksHTML(allTasks, 'show urgency\nshort mode');
113119
});
114120

115121
it('fully populated task - hidden fields', async () => {

0 commit comments

Comments
 (0)