From 6277cefa070a6420e16bf4091b1406dcd8519f79 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Mon, 8 Apr 2019 16:57:35 -0600 Subject: [PATCH] Clean up assertion style I prefer to express only one assertion per line rather than &&-ing together multiple assertions into a condition. I also prefer to use equality assertions so that failure messages include more information about the actual and expected values. I used nested scope blocks so we could re-define the `range` constant in a local scope without needing to mutate a variable across unrelated tests. --- spec/text-editor-spec.js | 75 ++++++++++++++++++++++++++-------------- 1 file changed, 49 insertions(+), 26 deletions(-) diff --git a/spec/text-editor-spec.js b/spec/text-editor-spec.js index 03cceef36..0018284b7 100644 --- a/spec/text-editor-spec.js +++ b/spec/text-editor-spec.js @@ -8425,41 +8425,64 @@ describe('TextEditor', () => { expect(editor.lineTextForBufferRow(0)).toBe('test') }) - it('does not select the new delimiters', () => { + fit('does not select the new delimiters', () => { editor.setText('') - let delimLength = '