Skip to content

Commit 964f7e0

Browse files
committed
Remove mock based tests
'should not throw when no routes' does not make much sense as the router DOES throw if there are no routes The other test just tests what is better tested by the rest of the tests
1 parent 8d58a5d commit 964f7e0

File tree

2 files changed

+0
-20
lines changed

2 files changed

+0
-20
lines changed

packages/ts/file-router/test/mocks/react-router.ts

-5
This file was deleted.

packages/ts/file-router/test/runtime/RouterConfigurationBuilder.spec.tsx

-15
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { createElement } from 'react';
44
import sinonChai from 'sinon-chai';
55
import { RouterConfigurationBuilder } from '../../src/runtime/RouterConfigurationBuilder.js';
66
import { mockDocumentBaseURI } from '../mocks/dom.js';
7-
import { browserRouter, createBrowserRouter } from '../mocks/react-router.js';
87
import { protectRoute } from '../mocks/vaadin-hilla-react-auth.js';
98

109
use(chaiLike);
@@ -642,11 +641,6 @@ describe('RouterBuilder', () => {
642641
]);
643642
});
644643

645-
it('should not throw when no routes', () => {
646-
const { routes } = new RouterConfigurationBuilder().withLayout(Server).build();
647-
648-
expect(routes).to.be.like([]);
649-
});
650644
});
651645

652646
describe('withLayoutSkipping', () => {
@@ -811,13 +805,4 @@ describe('RouterBuilder', () => {
811805
});
812806
});
813807

814-
describe('build', () => {
815-
it('should build the router', () => {
816-
const { routes, router } = builder.build();
817-
818-
expect(router).to.equal(browserRouter);
819-
expect(createBrowserRouter).to.have.been.calledWith(routes, { basename: '/foo' });
820-
reset();
821-
});
822-
});
823808
});

0 commit comments

Comments
 (0)