Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Commit

Permalink
fixed lint
Browse files Browse the repository at this point in the history
  • Loading branch information
darangi committed Nov 15, 2019
1 parent 8c665d7 commit 32ba069
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions spec/text-buffer-spec.js
Original file line number Diff line number Diff line change
@@ -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)')
})
})

0 comments on commit 32ba069

Please # to comment.