Skip to content

Commit

Permalink
chore: More tidying
Browse files Browse the repository at this point in the history
  • Loading branch information
tofumatt committed Jul 25, 2018
1 parent 70a8d24 commit 068fce3
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 21 deletions.
4 changes: 2 additions & 2 deletions editor/store/test/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 posts slug if no edits have been made', () => {
const state = {
currentPost: { slug: 'post slug' },
editor: {
Expand Down Expand Up @@ -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 dont exist', () => {
const state = {
blockListSettings: {},
};
Expand Down
2 changes: 1 addition & 1 deletion packages/blocks/src/api/test/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ describe( 'block parser', () => {
} );

describe( 'parseWithAttributeSchema', () => {
it( "should return the matcher's attribute value", () => {
it( 'should return the matchers attribute value', () => {
const value = parseWithAttributeSchema(
'<div>chicken</div>',
{
Expand Down
6 changes: 3 additions & 3 deletions packages/components/src/popover/test/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 theres enought space', () => {
const anchorRect = {
top: 10,
left: 10,
Expand Down Expand Up @@ -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 theres enought space', () => {
const anchorRect = {
top: 10,
left: 10,
Expand Down Expand Up @@ -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 theres enought space', () => {
const anchorRect = {
top: 10,
left: 10,
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/slot-fill/test/slot.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ describe( 'Slot', () => {
expect( element.find( 'Slot > div' ).html() ).toBe( '<div role="presentation"><span></span><div></div>text</div>' );
} );

it( "calls the functions passed as the Slot's fillProps in the Fill", () => {
it( 'calls the functions passed as the Slots fillProps in the Fill', () => {
const onClose = jest.fn();

const element = mount(
Expand Down
14 changes: 7 additions & 7 deletions packages/core-data/src/test/entities.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
Expand All @@ -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' } ] },
};
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion packages/core-data/src/test/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ describe( 'isRequestingCategories()', () => {
} );

describe( 'getEntityRecord', () => {
it( "should return undefined for unknown record's key", () => {
it( 'should return undefined for unknown records key', () => {
const state = deepFreeze( {
entities: {
data: {
Expand Down
12 changes: 6 additions & 6 deletions packages/dom/src/test/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ 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();
expect( isHorizontalEdge( input, true ) ).toBe( true );
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';
Expand All @@ -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';
Expand All @@ -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 were not at the edge', () => {
const input = document.createElement( 'input' );
parent.appendChild( input );
input.value = 'value';
Expand All @@ -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';
Expand All @@ -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 );
Expand Down

0 comments on commit 068fce3

Please sign in to comment.