Skip to content

Commit

Permalink
Adjust test order
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Apr 19, 2019
1 parent 4e4c259 commit 0f9e0f9
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions packages/rich-text/src/store/test/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,32 @@ describe( 'selectors', () => {
className: null,
tagName: 'format',
};
const formatTypeBareTag = {
name: 'core/test-format-bare-tag',
className: null,
tagName: 'strong',
};
const formatTypeClassName = {
name: 'core/test-format-class-name',
className: 'class-name',
tagName: 'strong',
};
const formatTypeBareTag = {
name: 'core/test-format-bare-tag',
className: null,
tagName: 'strong',
};
const defaultState = deepFreeze( {
formatTypes: {
'core/test-format': formatType,
'core/test-format-bare-tag': formatTypeBareTag,
'core/test-format-class-name': formatTypeClassName,
// Order matters: we need to ensure that
// `core/test-format-class-name` is not considered bare.
'core/test-format-bare-tag': formatTypeBareTag,
},
} );

describe( 'getFormatTypes', () => {
it( 'should get format types', () => {
const expected = [
formatType,
formatTypeBareTag,
formatTypeClassName,
formatTypeBareTag,
];
expect( getFormatTypes( defaultState ) ).toEqual( expected );
} );
Expand Down

0 comments on commit 0f9e0f9

Please sign in to comment.