mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-03-07 10:52:24 -05:00
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.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user