diff --git a/spec/workspace-spec.js b/spec/workspace-spec.js index 43e4fbae4..b04d8cbd7 100644 --- a/spec/workspace-spec.js +++ b/spec/workspace-spec.js @@ -1336,7 +1336,9 @@ i = /test/; #FIXME\ it('calls the callback with all regex results in all files in the project', () => { const results = [] waitsForPromise(() => - atom.workspace.scan(/(a)+/, result => results.push(result)) + atom.workspace.scan( + /(a)+/, {leadingContextLineCount: 1, trailingContextLineCount: 1}, + result => results.push(result)) ) runs(() => { @@ -1349,14 +1351,16 @@ i = /test/; #FIXME\ lineTextOffset: 0, range: [[0, 0], [0, 3]], leadingContextLines: [], - trailingContextLines: [] + trailingContextLines: ['cc aa cc'] }) }) }) it('works with with escaped literals (like $ and ^)', () => { const results = [] - waitsForPromise(() => atom.workspace.scan(/\$\w+/, result => results.push(result))) + waitsForPromise(() => atom.workspace.scan( + /\$\w+/, {leadingContextLineCount: 1, trailingContextLineCount: 1}, + result => results.push(result))) runs(() => { expect(results.length).toBe(1) @@ -1368,7 +1372,7 @@ i = /test/; #FIXME\ lineText: 'dollar$bill', lineTextOffset: 0, range: [[2, 6], [2, 11]], - leadingContextLines: [], + leadingContextLines: ['cc aa cc'], trailingContextLines: [] }) })