From b4d985e0712c2111438bd1f139ed7e8372123403 Mon Sep 17 00:00:00 2001 From: Tom Byers Date: Tue, 15 Sep 2020 17:07:01 +0100 Subject: [PATCH] Rewrite test descriptions They originals didn't explain what the tests do. We could test the contents of the range but that would be testing the Range API, rather than our use of it. The tests test how we use that API for these scenarios so their descriptions should say this. --- tests/javascripts/apiKey.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/javascripts/apiKey.test.js b/tests/javascripts/apiKey.test.js index 8aa20c7f0..08f974928 100644 --- a/tests/javascripts/apiKey.test.js +++ b/tests/javascripts/apiKey.test.js @@ -344,7 +344,7 @@ describe('API key', () => { }); - test("the copied selection shouldn't include the prefix of the id", () => { + test("the copied selection (range) should start after the prefix of the id", () => { // that selection (a range) should have a startOffset past the first two nodes: // index 0: text node containing the whitespace before the prefix @@ -388,7 +388,7 @@ describe('API key', () => { }) - test("the copied selection should match the id", () => { + test("the copied selection (range) should start at the default position", () => { // that selection (a range) shouldn't call setStart to avoid the prefix: expect(rangeMock.setStart).not.toHaveBeenCalled();