From 068fce355a4375d6090225bca2e265eb8731f9e4 Mon Sep 17 00:00:00 2001 From: "Matthew Riley MacPherson (tofumatt)" Date: Wed, 25 Jul 2018 12:24:57 +0100 Subject: [PATCH] chore: More tidying --- editor/store/test/selectors.js | 4 ++-- packages/blocks/src/api/test/parser.js | 2 +- packages/components/src/popover/test/utils.js | 6 +++--- packages/components/src/slot-fill/test/slot.js | 2 +- packages/core-data/src/test/entities.js | 14 +++++++------- packages/core-data/src/test/selectors.js | 2 +- packages/dom/src/test/dom.js | 12 ++++++------ 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/editor/store/test/selectors.js b/editor/store/test/selectors.js index 03ebca1917a9d..b2db14746df38 100644 --- a/editor/store/test/selectors.js +++ b/editor/store/test/selectors.js @@ -395,7 +395,7 @@ describe( 'selectors', () => { } ); describe( 'getEditedPostAttribute', () => { - it( "should return the current post's slug if no edits have been made", () => { + it( 'should return the current post’s slug if no edits have been made', () => { const state = { currentPost: { slug: 'post slug' }, editor: { @@ -3870,7 +3870,7 @@ describe( 'selectors', () => { } ); } ); - it( "should return undefined if settings for the block don't exist", () => { + it( 'should return undefined if settings for the block don’t exist', () => { const state = { blockListSettings: {}, }; diff --git a/packages/blocks/src/api/test/parser.js b/packages/blocks/src/api/test/parser.js index 56aff2c0d6083..3c12fee973ff4 100644 --- a/packages/blocks/src/api/test/parser.js +++ b/packages/blocks/src/api/test/parser.js @@ -137,7 +137,7 @@ describe( 'block parser', () => { } ); describe( 'parseWithAttributeSchema', () => { - it( "should return the matcher's attribute value", () => { + it( 'should return the matcher’s attribute value', () => { const value = parseWithAttributeSchema( '
chicken
', { diff --git a/packages/components/src/popover/test/utils.js b/packages/components/src/popover/test/utils.js index 0ea5844f06f59..3c491fa98d9a5 100644 --- a/packages/components/src/popover/test/utils.js +++ b/packages/components/src/popover/test/utils.js @@ -8,7 +8,7 @@ import { } from '../utils'; describe( 'computePopoverYAxisPosition', () => { - it( "should leave the position as is there's enought space", () => { + it( 'should leave the position as is there’s enought space', () => { const anchorRect = { top: 10, left: 10, @@ -98,7 +98,7 @@ describe( 'computePopoverYAxisPosition', () => { } ); describe( 'computePopoverXAxisPosition', () => { - it( "should leave the position as is there's enought space", () => { + it( 'should leave the position as is there’s enought space', () => { const anchorRect = { top: 10, left: 10, @@ -166,7 +166,7 @@ describe( 'computePopoverXAxisPosition', () => { } ); describe( 'computePopoverPosition', () => { - it( "should leave the position as is there's enought space", () => { + it( 'should leave the position as is there’s enought space', () => { const anchorRect = { top: 10, left: 10, diff --git a/packages/components/src/slot-fill/test/slot.js b/packages/components/src/slot-fill/test/slot.js index 59b8b8bb7523b..48b2bc805dd3a 100644 --- a/packages/components/src/slot-fill/test/slot.js +++ b/packages/components/src/slot-fill/test/slot.js @@ -83,7 +83,7 @@ describe( 'Slot', () => { expect( element.find( 'Slot > div' ).html() ).toBe( '
text
' ); } ); - it( "calls the functions passed as the Slot's fillProps in the Fill", () => { + it( 'calls the functions passed as the Slot’s fillProps in the Fill', () => { const onClose = jest.fn(); const element = mount( diff --git a/packages/core-data/src/test/entities.js b/packages/core-data/src/test/entities.js index 5facfb37b6f43..850ccc4c802f4 100644 --- a/packages/core-data/src/test/entities.js +++ b/packages/core-data/src/test/entities.js @@ -10,31 +10,31 @@ import { getMethodName, defaultEntities, getKindEntities } from '../entities'; import { addEntities } from '../actions'; describe( 'getMethodName', () => { - it( 'Should return the right method name for an entity with the root kind', () => { + it( 'should return the right method name for an entity with the root kind', () => { const methodName = getMethodName( 'root', 'postType' ); expect( methodName ).toEqual( 'getPostType' ); } ); - it( 'Should use a different suffix', () => { + it( 'should use a different suffix', () => { const methodName = getMethodName( 'root', 'postType', 'set' ); expect( methodName ).toEqual( 'setPostType' ); } ); - it( 'Should use the plural form', () => { + it( 'should use the plural form', () => { const methodName = getMethodName( 'root', 'postType', 'get', true ); expect( methodName ).toEqual( 'getPostTypes' ); } ); - it( 'Should use the given plural form', () => { + it( 'should use the given plural form', () => { const methodName = getMethodName( 'root', 'taxonomy', 'get', true ); expect( methodName ).toEqual( 'getTaxonomies' ); } ); - it( 'Should include the kind in the method name', () => { + it( 'should include the kind in the method name', () => { const id = defaultEntities.length; defaultEntities[ id ] = { name: 'book', kind: 'postType' }; const methodName = getMethodName( 'postType', 'book' ); @@ -59,7 +59,7 @@ describe( 'getKindEntities', () => { } ); } ); - it( "shouldn't do anything if the entities have already been resolved", async () => { + it( 'shouldn’t do anything if the entities have already been resolved', async () => { const state = { entities: { config: [ { kind: 'postType' } ] }, }; @@ -68,7 +68,7 @@ describe( 'getKindEntities', () => { expect( done ).toBe( true ); } ); - it( "shouldn't do anything if there no defined kind config", async () => { + it( 'shouldn’t do anything if there no defined kind config', async () => { const state = { entities: { config: [] } }; const fulfillment = getKindEntities( state, 'unknownKind' ); const done = ( await fulfillment.next() ).done; diff --git a/packages/core-data/src/test/selectors.js b/packages/core-data/src/test/selectors.js index bb6e17b745b0d..ce3b68cf1b4d6 100644 --- a/packages/core-data/src/test/selectors.js +++ b/packages/core-data/src/test/selectors.js @@ -67,7 +67,7 @@ describe( 'isRequestingCategories()', () => { } ); describe( 'getEntityRecord', () => { - it( "should return undefined for unknown record's key", () => { + it( 'should return undefined for unknown record’s key', () => { const state = deepFreeze( { entities: { data: { diff --git a/packages/dom/src/test/dom.js b/packages/dom/src/test/dom.js index 91ab71fed896e..66d88c5844d87 100644 --- a/packages/dom/src/test/dom.js +++ b/packages/dom/src/test/dom.js @@ -16,7 +16,7 @@ describe( 'DOM', () => { } ); describe( 'isHorizontalEdge', () => { - it( 'Should return true for empty input', () => { + it( 'should return true for empty input', () => { const input = document.createElement( 'input' ); parent.appendChild( input ); input.focus(); @@ -24,7 +24,7 @@ describe( 'DOM', () => { expect( isHorizontalEdge( input, false ) ).toBe( true ); } ); - it( 'Should return the right values if we focus the end of the input', () => { + it( 'should return the right values if we focus the end of the input', () => { const input = document.createElement( 'input' ); parent.appendChild( input ); input.value = 'value'; @@ -35,7 +35,7 @@ describe( 'DOM', () => { expect( isHorizontalEdge( input, false ) ).toBe( true ); } ); - it( 'Should return the right values if we focus the start of the input', () => { + it( 'should return the right values if we focus the start of the input', () => { const input = document.createElement( 'input' ); parent.appendChild( input ); input.value = 'value'; @@ -46,7 +46,7 @@ describe( 'DOM', () => { expect( isHorizontalEdge( input, false ) ).toBe( false ); } ); - it( "Should return false if we're not at the edge", () => { + it( 'should return false if we’re not at the edge', () => { const input = document.createElement( 'input' ); parent.appendChild( input ); input.value = 'value'; @@ -57,7 +57,7 @@ describe( 'DOM', () => { expect( isHorizontalEdge( input, false ) ).toBe( false ); } ); - it( 'Should return false if the selection is not collapseds', () => { + it( 'should return false if the selection is not collapseds', () => { const input = document.createElement( 'input' ); parent.appendChild( input ); input.value = 'value'; @@ -68,7 +68,7 @@ describe( 'DOM', () => { expect( isHorizontalEdge( input, false ) ).toBe( false ); } ); - it( 'Should always return true for non content editabless', () => { + it( 'should always return true for non content editabless', () => { const div = document.createElement( 'div' ); parent.appendChild( div ); expect( isHorizontalEdge( div, true ) ).toBe( true );