You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: skip run if @netlify/plugin-nextjs installed (#1536)
* feat: skip run if @netlify/plugin-nextjs installed
disable in order to avoid conflicts should the old package be installed in the project.
* test: add a couple of tests
* feat: add shortlink
Shortlink will eventually link to related documentation
'Please remove @netlify/plugin-nextjs from your site. It is no longer required and will prevent you using new features. Learn more: https://ntl.fyi/3w85e2E',
test('show warning message to remove old plugin',async()=>{
565
+
isOldPluginInstalled.mockImplementation(()=>{
566
+
returntrue
567
+
})
568
+
constmockStatusFunc=jest.fn()
569
+
570
+
awaitplugin.onPostBuild({
571
+
...defaultArgs,
572
+
utils: { ...utils,status: {show: mockStatusFunc}}
573
+
})
574
+
575
+
expect(mockStatusFunc).toHaveBeenCalledWith({"summary": "Please remove @netlify/plugin-nextjs from your site. It is no longer required and will prevent you using new features. Learn more: https://ntl.fyi/3w85e2E"})
576
+
577
+
})
578
+
579
+
test('does not show warning message to remove old plugin',async()=>{
expect(mockStatusFunc).not.toHaveBeenCalledWith({"summary": "Please remove @netlify/plugin-nextjs from your site. It is no longer required and will prevent you using new features."})
0 commit comments