Skip to content

Commit

Permalink
chore: Change escaped single-quoted strings after #7366
Browse files Browse the repository at this point in the history
  • Loading branch information
tofumatt committed Jun 26, 2018
1 parent c500c09 commit 87b1672
Show file tree
Hide file tree
Showing 42 changed files with 76 additions and 76 deletions.
8 changes: 4 additions & 4 deletions blocks/api/test/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,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(
'<div>chicken</div>',
{
Expand All @@ -121,7 +121,7 @@ describe( 'block parser', () => {
expect( value ).toBe( 10 );
} );

it( 'should return the matcher\'s attribute value', () => {
it( "should return the matcher's attribute value", () => {
const value = getBlockAttribute(
'content',
{
Expand Down Expand Up @@ -427,7 +427,7 @@ describe( 'block parser', () => {
} );

const parsed = parse(
'<!-- wp:core/test-block {"smoked":"yes","url":"http://google.com","chicken":"ribs & \'wings\'"} -->' +
`<!-- wp:core/test-block {"smoked":"yes","url":"http://google.com","chicken":"ribs & 'wings'"} -->` +
'Brisket' +
'<!-- /wp:core/test-block -->'
);
Expand All @@ -438,7 +438,7 @@ describe( 'block parser', () => {
content: 'Brisket',
smoked: 'yes',
url: 'http://google.com',
chicken: 'ribs & \'wings\'',
chicken: "ribs & 'wings'",
} );
expect( typeof parsed[ 0 ].uid ).toBe( 'string' );
} );
Expand Down
2 changes: 1 addition & 1 deletion blocks/api/test/serializer.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ describe( 'block serializer', () => {
} );

describe( 'getBlockContent', () => {
it( 'should return the block\'s serialized inner HTML', () => {
it( "should return the block's serialized inner HTML", () => {
const blockType = {
attributes: {
content: {
Expand Down
4 changes: 2 additions & 2 deletions blocks/api/test/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ describe( 'templates', () => {
expect( doBlocksMatchTemplate( blockList, template ) ).toBe( true );
} );

it( 'return false if the template length doesn\'t match the blocks length', () => {
it( "return false if the template length doesn't match the blocks length", () => {
const template = [
[ 'core/test-block' ],
[ 'core/test-block-2' ],
Expand All @@ -86,7 +86,7 @@ describe( 'templates', () => {
expect( doBlocksMatchTemplate( blockList, template ) ).toBe( false );
} );

it( 'return false if the nested template doesn\'t match the blocks', () => {
it( "return false if the nested template doesn't match the blocks", () => {
const template = [
[ 'core/test-block' ],
[ 'core/test-block-2', {}, [
Expand Down
4 changes: 2 additions & 2 deletions blocks/api/test/validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ describe( 'validation', () => {
it( 'returns true if the same style', () => {
const isEqual = isEqualAttributesOfName.style(
'background-image: url( "https://wordpress.org/img.png" ); color: red;',
'color: red; background-image: url(\'https://wordpress.org/img.png\n);'
"color: red; background-image: url('https://wordpress.org/img.png\n);"
);

expect( isEqual ).toBe( true );
Expand All @@ -186,7 +186,7 @@ describe( 'validation', () => {
it( 'returns false if not same style', () => {
const isEqual = isEqualAttributesOfName.style(
'background-image: url( "https://wordpress.org/img.png" ); color: red;',
'color: red; font-size: 13px; background-image: url(\'https://wordpress.org/img.png\');'
"color: red; font-size: 13px; background-image: url('https://wordpress.org/img.png');"
);

expect( isEqual ).toBe( false );
Expand Down
2 changes: 1 addition & 1 deletion components/autocomplete/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ describe( 'Autocomplete', () => {
} );
} );

it( 'doesn\'t otherwise interfere with keydown behavior', ( done ) => {
it( "doesn't otherwise interfere with keydown behavior", ( done ) => {
const wrapper = makeAutocompleter( [ slashCompleter ] );
// listen to keydown events on the editor to see if it gets them
const editorKeydown = jest.fn();
Expand Down
4 changes: 2 additions & 2 deletions components/disabled/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,14 @@ describe( 'Disabled', () => {

// Skipped temporarily until Enzyme publishes new version that works with React 16.3.0 APIs.
// eslint-disable-next-line jest/no-disabled-tests
test.skip( 'lets components know that they\'re disabled via context', () => {
test.skip( "lets components know that they're disabled via context", () => {
const wrapper = mount( <Disabled><DisabledStatus /></Disabled> );
expect( wrapper.text() ).toBe( 'Disabled' );
} );

// Skipped temporarily until Enzyme publishes new version that works with React 16.3.0 APIs.
// eslint-disable-next-line jest/no-disabled-tests
test.skip( 'lets components know that they\'re not disabled via context', () => {
test.skip( "lets components know that they're not disabled via context", () => {
const wrapper = mount( <DisabledStatus /> );
expect( wrapper.text() ).toBe( 'Not disabled' );
} );
Expand Down
2 changes: 1 addition & 1 deletion components/higher-order/with-focus-outside/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ describe( 'withFocusOutside', () => {
expect( callback ).not.toHaveBeenCalled();
} );

it( 'should call handler if focus doesn\'t shift to element within component', () => {
it( "should call handler if focus doesn't shift to element within component", () => {
const callback = jest.fn();
const wrapper = mount( <EnhancedComponent onFocusOutside={ callback } /> );

Expand Down
14 changes: 7 additions & 7 deletions components/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 there's enought space", () => {
const anchorRect = {
top: 10,
left: 10,
Expand All @@ -30,7 +30,7 @@ describe( 'computePopoverYAxisPosition', () => {
} );
} );

it( 'should switch to bottom position if there\'s not enough space', () => {
it( "should switch to bottom position if there's not enough space", () => {
const anchorRect = {
top: 10,
left: 10,
Expand All @@ -52,7 +52,7 @@ describe( 'computePopoverYAxisPosition', () => {
} );
} );

it( 'should set a maxHeight if there\'s not enough space in any direction', () => {
it( "should set a maxHeight if there's not enough space in any direction", () => {
const anchorRect = {
top: 400,
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 there's enought space", () => {
const anchorRect = {
top: 10,
left: 10,
Expand All @@ -120,7 +120,7 @@ describe( 'computePopoverXAxisPosition', () => {
} );
} );

it( 'should switch to right position if there\'s not enough space', () => {
it( "should switch to right position if there's not enough space", () => {
const anchorRect = {
top: 10,
left: 10,
Expand All @@ -142,7 +142,7 @@ describe( 'computePopoverXAxisPosition', () => {
} );
} );

it( 'should set a maxWidth if there\'s not enough space in any direction', () => {
it( "should set a maxWidth if there's not enough space in any direction", () => {
const anchorRect = {
top: 10,
left: 400,
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion components/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><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 Slot's fillProps in the Fill", () => {
const onClose = jest.fn();

const element = mount(
Expand Down
2 changes: 1 addition & 1 deletion core-blocks/categories/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const name = 'core/categories';
export const settings = {
title: __( 'Categories' ),

description: __( 'Display a list of all your site\'s categories.' ),
description: __( "Display a list of all your site's categories." ),

icon: 'list-view',

Expand Down
2 changes: 1 addition & 1 deletion core-blocks/columns/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const settings = {
},
},

description: __( 'Add a block that displays content in multiple columns, then add whatever content blocks you\'d like.' ),
description: __( "Add a block that displays content in multiple columns, then add whatever content blocks you'd like." ),

supports: {
align: [ 'wide', 'full' ],
Expand Down
2 changes: 1 addition & 1 deletion core-blocks/freeform/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const name = 'core/freeform';
export const settings = {
title: __( 'Classic' ),

description: __( 'It\'s the classic WordPress editor and it\'s a block! Drop the editor right in.' ),
description: __( "It's the classic WordPress editor and it's a block! Drop the editor right in." ),

icon: 'editor-kitchensink',

Expand Down
2 changes: 1 addition & 1 deletion core-blocks/image/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const schema = {
export const settings = {
title: __( 'Image' ),

description: __( 'They\'re worth 1,000 words! Insert a single image.' ),
description: __( "They're worth 1,000 words! Insert a single image." ),

icon: 'format-image',

Expand Down
2 changes: 1 addition & 1 deletion core-blocks/more/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const name = 'core/more';
export const settings = {
title: __( 'More' ),

description: __( 'Want to show only part of this post on your blog\'s home page? Insert a "More" block where you want the split.' ),
description: __( `Want to show only part of this post on your blog's home page? Insert a "More" block where you want the split.` ),

icon: 'editor-insertmore',

Expand Down
2 changes: 1 addition & 1 deletion core-blocks/subhead/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const name = 'core/subhead';
export const settings = {
title: __( 'Subheading' ),

description: __( 'What\'s a subhead? Smaller than a headline, bigger than basic text.' ),
description: __( "What's a subhead? Smaller than a headline, bigger than basic text." ),

icon: 'text',

Expand Down
10 changes: 5 additions & 5 deletions core-blocks/test/full-content.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ describe( 'full post content fixture', () => {
).toEqual( parserOutputExpected );
} catch ( err ) {
throw new Error( format(
'File \'%s.parsed.json\' does not match expected value:\n\n%s',
"File '%s.parsed.json' does not match expected value:\n\n%s",
f,
err.message
) );
Expand Down Expand Up @@ -181,7 +181,7 @@ describe( 'full post content fixture', () => {
).toEqual( blocksExpected );
} catch ( err ) {
throw new Error( format(
'File \'%s.json\' does not match expected value:\n\n%s',
"File '%s.json' does not match expected value:\n\n%s",
f,
err.message
) );
Expand All @@ -207,7 +207,7 @@ describe( 'full post content fixture', () => {
expect( serializedActual ).toEqual( serializedExpected );
} catch ( err ) {
throw new Error( format(
'File \'%s.serialized.html\' does not match expected value:\n\n%s',
"File '%s.serialized.html' does not match expected value:\n\n%s",
f,
err.message
) );
Expand Down Expand Up @@ -246,7 +246,7 @@ describe( 'full post content fixture', () => {

if ( ! foundFixtures.length ) {
errors.push( format(
'Expected a fixture file called \'%s.html\' or \'%s__*.html\'.',
"Expected a fixture file called '%s.html' or '%s__*.html'.",
nameToFilename,
nameToFilename
) );
Expand All @@ -255,7 +255,7 @@ describe( 'full post content fixture', () => {
foundFixtures.forEach( ( fixture ) => {
if ( name !== fixture.firstBlock ) {
errors.push( format(
'Expected fixture file \'%s\' to test the \'%s\' block.',
"Expected fixture file '%s' to test the '%s' block.",
fixture.filename,
name
) );
Expand Down
4 changes: 2 additions & 2 deletions docs/data/tool/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ module.exports = {
actions: [ path.resolve( root, 'blocks/store/actions.js' ) ],
},
'core/editor': {
title: 'The Editor\'s Data',
title: "The Editor's Data",
selectors: [ path.resolve( root, 'editor/store/selectors.js' ) ],
actions: [ path.resolve( root, 'editor/store/actions.js' ) ],
},
'core/edit-post': {
title: 'The Editor\'s UI Data',
title: "The Editor's UI Data",
selectors: [ path.resolve( root, 'edit-post/store/selectors.js' ) ],
actions: [ path.resolve( root, 'edit-post/store/actions.js' ) ],
},
Expand Down
2 changes: 1 addition & 1 deletion editor/components/autocompleters/test/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ describe( 'block', () => {
expect( labelComponents.at( 1 ).text() ).toBe( 'expected-text' );
} );

it( 'should derive isOptionDisabled from the item\'s isDisabled', () => {
it( "should derive isOptionDisabled from the item's isDisabled", () => {
const disabledInserterItem = {
name: 'core/foo',
title: 'foo',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { shallow } from 'enzyme';
import { BlockModeToggle } from '../block-mode-toggle';

describe( 'BlockModeToggle', () => {
it( 'should not render the HTML mode button if the block doesn\'t support it', () => {
it( "should not render the HTML mode button if the block doesn't support it", () => {
const wrapper = shallow(
<BlockModeToggle blockType={ { supports: { html: false } } } />
);
Expand Down
2 changes: 1 addition & 1 deletion editor/components/colors/with-colors.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default ( ...args ) => {
if ( isFunction( args[ 0 ] ) ) {
deprecated( 'Using withColors( mapGetSetColorToProps ) ', {
version: '3.3',
alternative: 'withColors( colorAttributeName, { secondColorAttributeName: \'color-context\' }, ... )',
alternative: "withColors( colorAttributeName, { secondColorAttributeName: 'color-context' }, ... )",
} );
return withColorsDeprecated( args[ 0 ] );
}
Expand Down
4 changes: 2 additions & 2 deletions editor/components/post-author/test/check.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ describe( 'PostAuthorCheck', () => {
expect( wrapper.type() ).toBe( null );
} );

it( 'should not render anything if doesn\'t have author action', () => {
it( "should not render anything if doesn't have author action", () => {
const wrapper = shallow(
<PostAuthorCheck authors={ users } hasAssignAuthorAction={ false }>
authors
Expand All @@ -58,7 +58,7 @@ describe( 'PostAuthorCheck', () => {
expect( wrapper.type() ).toBe( null );
} );

it( 'should render control', () => {
it( 'should render control', () => {
const wrapper = shallow(
<PostAuthorCheck authors={ users } hasAssignAuthorAction={ true }>
authors
Expand Down
2 changes: 1 addition & 1 deletion editor/components/post-pending-status/test/check.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { shallow } from 'enzyme';
import { PostPendingStatusCheck } from '../check';

describe( 'PostPendingStatusCheck', () => {
it( 'should not render anything if the user doesn\'t have the right capabilities', () => {
it( "should not render anything if the user doesn't have the right capabilities", () => {
const wrapper = shallow(
<PostPendingStatusCheck hasPublishAction={ false }>
status
Expand Down
2 changes: 1 addition & 1 deletion editor/components/post-publish-panel/postpublish.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class PostPublishPanelPostpublish extends Component {
__( 'is now live.' );
const postPublishBodyText = isScheduled ?
__( 'The post address will be:' ) :
__( 'What\'s next?' );
__( "What's next?" );

return (
<div className="post-publish-panel__postpublish">
Expand Down
2 changes: 1 addition & 1 deletion editor/components/post-publish-panel/prepublish.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function PostPublishPanelPrepublish( {
return (
<div className="editor-post-publish-panel__prepublish">
<div><strong>{ hasPublishAction ? __( 'Are you ready to publish?' ) : __( 'Are you ready to submit for review?' ) }</strong></div>
<p>{ hasPublishAction ? __( 'Here, you can do a last-minute check up of your settings below, before you publish.' ) : __( 'When you\'re ready, submit your work for review, and an Editor will be able to approve it for you.' ) }</p>
<p>{ hasPublishAction ? __( 'Here, you can do a last-minute check up of your settings below, before you publish.' ) : __( "When you're ready, submit your work for review, and an Editor will be able to approve it for you." ) }</p>
{ hasPublishAction && (
<Fragment>
<PanelBody initialOpen={ false } title={ [
Expand Down
2 changes: 1 addition & 1 deletion editor/components/post-schedule/test/check.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { shallow } from 'enzyme';
import { PostScheduleCheck } from '../check';

describe( 'PostScheduleCheck', () => {
it( 'should not render anything if the user doesn\'t have the right capabilities', () => {
it( "should not render anything if the user doesn't have the right capabilities", () => {
const wrapper = shallow( <PostScheduleCheck hasPublishAction={ false } >yes</PostScheduleCheck> );
expect( wrapper.type() ).toBe( null );
} );
Expand Down
2 changes: 1 addition & 1 deletion editor/components/post-sticky/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe( 'PostSticky', () => {
expect( wrapper.type() ).toBe( null );
} );

it( 'should not render anything if post doesn\'t support stickying', () => {
it( "should not render anything if post doesn't support stickying", () => {
const wrapper = shallow(
<PostStickyCheck postType="post" hasStickyAction={ false }>
Can Toggle Sticky
Expand Down
Loading

0 comments on commit 87b1672

Please sign in to comment.