diff --git a/spec/text-buffer-spec.js b/spec/text-buffer-spec.js index 7cbf45898d..113a3bc2a1 100644 --- a/spec/text-buffer-spec.js +++ b/spec/text-buffer-spec.js @@ -1,14 +1,14 @@ -const path = require('path'); -const TextBuffer = require ('../src/text-buffer'); +const path = require('path') +const TextBuffer = require('../src/text-buffer') describe('when a buffer is already open', () => { - it('replaces foo( with bar( using /\bfoo\(\b/gim', () => { - const filePath = path.join(__dirname, 'fixtures','sample.js'); - const buffer = new TextBuffer(); - buffer.setPath(filePath); - buffer.setText('foo(x)'); - buffer.replace(/\bfoo\(\b/gim,'bar('); + it('replaces foo( with bar( using /\bfoo\\(\b/gim', () => { + const filePath = path.join(__dirname, 'fixtures', 'sample.js') + const buffer = new TextBuffer() + buffer.setPath(filePath) + buffer.setText('foo(x)') + buffer.replace(/\bfoo\(\b/gim, 'bar(') - expect(buffer.getText()).toBe('bar(x)'); - }); -}); + expect(buffer.getText()).toBe('bar(x)') + }) +})