Skip to content
This repository was archived by the owner on Aug 7, 2023. It is now read-only.

Commit 94f87f5

Browse files
committed
test: reload manually in makeFixes
1 parent 0ae102c commit 94f87f5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

spec/linter-eslint-spec.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,11 @@ function getNotification(expectedMessage) {
9393
* @returns {Promise<void>}
9494
*/
9595
async function makeFixes(textEditor) {
96+
const buffer = textEditor.getBuffer()
9697
/** @type {Promise<void>} */
9798
const editorReloadPromise = new Promise((resolve) => {
9899
// Subscribe to file reload events
99-
const editorReloadSubscription = textEditor.getBuffer().onDidReload(() => {
100+
const editorReloadSubscription = buffer.onDidReload(() => {
100101
editorReloadSubscription.dispose()
101102
resolve()
102103
})
@@ -115,6 +116,7 @@ async function makeFixes(textEditor) {
115116
expect(notification.getType()).toBe('success')
116117

117118
// After editor reloads, it should be safe for consuming test to resume.
119+
buffer.reload()
118120
return editorReloadPromise
119121
}
120122

0 commit comments

Comments
 (0)