Repository: atom/atom
File: spec/workspace-spec.js (JavaScript)

Code before:
              const { filePath, matches } = results[0];
              expect(filePath).toBe(
                atom.project
                  .getDirectories()[0]
                  .resolve('file-with-newline-literal')
              );
              expect(matches).toHaveLength(1);
              expect(matches[0]).toEqual({
                matchText: 'newline3\n',
                lineText: 'newline3',
                lineTextOffset: 0,
                range: [[2, 0], [3, 0]],
                leadingContextLines: [],
                trailingContextLines: []
              });
            });
          });
          describe('pcre2 enabled', async () => {
            it('supports lookbehind searches', async () => {
              const results = [];

              await scan(/(?<!a)aa\b/, {}, result => results.push(result));

              expect(results.length).toBe(1);
              const { filePath, matches } = results[0];
              expect(filePath).toBe(atom.project.getDirectories()[0].resolve('a'));
              expect(matches).toHaveLength(1);
              expect(matches[0]).toEqual({
                matchText: 'aa',
                lineText: 'cc aa cc',
                lineTextOffset: 0,
                range: [[1, 3], [1, 5]],
                leadingContextLines: ['aaa bbb'],
                trailingContextLines: ['dollar$bill']
              });
            });
          });
        }

        it('returns results on lines with unicode strings', async () => {
          const results = [];

          await scan(/line with unico/, {}, result => results.push(result));
          expect(results.length).toBe(1);
          const { filePath, matches } = results[0];
          expect(filePath).toBe(
            atom.project.getDirectories()[0].resolve('file-with-unicode')
          );
          expect(matches).toHaveLength(1);
          expect(matches[0]).toEqual({
            matchText: 'line with unico',

Review comment (suggestion):
I think that this should fix the linter error:

```suggestion
              expect(filePath).toBe(
                atom.project.getDirectories()[0].resolve('a')
              );
```

Code after:
              const { filePath, matches } = results[0];
              expect(filePath).toBe(
                atom.project
                  .getDirectories()[0]
                  .resolve('file-with-newline-literal')
              );
              expect(matches).toHaveLength(1);
              expect(matches[0]).toEqual({
                matchText: 'newline3\n',
                lineText: 'newline3',
                lineTextOffset: 0,
                range: [[2, 0], [3, 0]],
                leadingContextLines: [],
                trailingContextLines: []
              });
            });
          });
          describe('pcre2 enabled', async () => {
            it('supports lookbehind searches', async () => {
              const results = [];

              await scan(/(?<!a)aa\b/, { PCRE2: true }, result =>
                results.push(result)
              );

              expect(results.length).toBe(1);
              const { filePath, matches } = results[0];
              expect(filePath).toBe(
                atom.project.getDirectories()[0].resolve('a')
              );
              expect(matches).toHaveLength(1);
              expect(matches[0]).toEqual({
                matchText: 'aa',
                lineText: 'cc aa cc',
                lineTextOffset: 0,
                range: [[1, 3], [1, 5]],
                leadingContextLines: [],
                trailingContextLines: []
              });
            });
          });
        }

        it('returns results on lines with unicode strings', async () => {
          const results = [];

          await scan(/line with unico/, {}, result => results.push(result));
          expect(results.length).toBe(1);
          const { filePath, matches } = results[0];
          expect(filePath).toBe(
            atom.project.getDirectories()[0].resolve('file-with-unicode')