Skip to content

Commit

Permalink
chore(file-router): do not bring old tests back
Browse files Browse the repository at this point in the history
  • Loading branch information
platosha committed Dec 10, 2024
1 parent e5b6db2 commit 551221f
Showing 1 changed file with 2 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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: () => {},
};
Expand Down Expand Up @@ -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', () => {
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 551221f

Please sign in to comment.