From 551221f33eb0e2b97d58ca67e8b0a24db3f14473 Mon Sep 17 00:00:00 2001 From: Anton Platonov Date: Tue, 10 Dec 2024 14:41:58 +0200 Subject: [PATCH] chore(file-router): do not bring old tests back --- .../RouterConfigurationBuilder.spec.tsx | 33 ++----------------- 1 file changed, 2 insertions(+), 31 deletions(-) diff --git a/packages/ts/file-router/test/runtime/RouterConfigurationBuilder.spec.tsx b/packages/ts/file-router/test/runtime/RouterConfigurationBuilder.spec.tsx index 33edbfaf88..aa99823fec 100644 --- a/packages/ts/file-router/test/runtime/RouterConfigurationBuilder.spec.tsx +++ b/packages/ts/file-router/test/runtime/RouterConfigurationBuilder.spec.tsx @@ -42,11 +42,12 @@ describe('RouterBuilder', () => { }, ]); reset = mockDocumentBaseURI('https://example.com/foo'); - // @ts-expect-error Fake just enough so tests pass globalThis.window = { + // @ts-expect-error Fake just enough so tests pass history: { replaceState: () => {}, }, + // @ts-expect-error Fake just enough so tests pass location: '', addEventListener: () => {}, }; @@ -643,12 +644,6 @@ describe('RouterBuilder', () => { }, ]); }); - - it('should not throw when no routes', () => { - const { routes } = new RouterConfigurationBuilder().withLayout(Server).build(); - - expect(routes).to.be.like([]); - }); }); describe('withLayoutSkipping', () => { @@ -813,30 +808,6 @@ describe('RouterBuilder', () => { }); }); - describe('build', () => { - it('should build the router', () => { - const { routes, router } = builder.build(); - - expect(router).to.equal(browserRouter); - expect(createBrowserRouter).to.have.been.calledWith(routes, { - basename: '/foo', - future: { - // eslint-disable-next-line camelcase - v7_fetcherPersist: true, - // eslint-disable-next-line camelcase - v7_normalizeFormMethod: true, - // eslint-disable-next-line camelcase - v7_partialHydration: true, - // eslint-disable-next-line camelcase - v7_relativeSplatPath: true, - // eslint-disable-next-line camelcase - v7_skipActionErrorRevalidation: true, - }, - }); - reset(); - }); - }); - describe('issues', () => { it('#2954', () => { const { routes } = new RouterConfigurationBuilder()