Skip to content

Commit

Permalink
Add experimental prefix to the filter name
Browse files Browse the repository at this point in the history
  • Loading branch information
Aljullu committed Oct 25, 2021
1 parent 06f306a commit 59ad6fc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,11 @@ const fetchLinkSuggestions = async (

return Promise.all( queries ).then( async ( results ) => {
const filteredResults = await Promise.resolve(
applyFilters( 'editor.fetchLink.suggestions', results, search )
applyFilters(
'experimentalEditor.fetchLink.suggestions',
results,
search
)
);
return filteredResults
.reduce(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ describe( 'fetchLinkSuggestions', () => {
} );
it( 'returns results added by hooks', () => {
addFilter(
'editor.fetchLink.suggestions',
'experimentalEditor.fetchLink.suggestions',
'plugin_link_suggestions',
( results ) => {
return results.concat( [
Expand All @@ -258,14 +258,14 @@ describe( 'fetchLinkSuggestions', () => {
type: 'custom_link',
} );
removeFilter(
'editor.fetchLink.suggestions',
'experimentalEditor.fetchLink.suggestions',
'plugin_link_suggestions'
);
} );
} );
it( 'returns results added by async hooks', () => {
addFilter(
'editor.fetchLink.suggestions',
'experimentalEditor.fetchLink.suggestions',
'plugin_link_suggestions',
( results ) => {
return new Promise( ( resolve ) => {
Expand All @@ -292,7 +292,7 @@ describe( 'fetchLinkSuggestions', () => {
} );

removeFilter(
'editor.fetchLink.suggestions',
'experimentalEditor.fetchLink.suggestions',
'plugin_link_suggestions'
);
} );
Expand Down

0 comments on commit 59ad6fc

Please sign in to comment.