chore: small changes

Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
blam
2024-08-15 15:19:10 +02:00
parent fe1fbb26eb
commit 5eed3b15e3
3 changed files with 2 additions and 5 deletions
@@ -90,7 +90,7 @@ function makeRoutingShimExtension(options: {
coreExtensionData.routeRef.optional(),
],
*factory() {
if (routePath) {
if (routePath !== undefined) {
yield coreExtensionData.routePath(routePath);
}
@@ -63,7 +63,7 @@ function createTestExtension(options: {
yield coreExtensionData.routePath(options.path);
}
if (options.routeRef !== undefined) {
if (options.routeRef) {
yield coreExtensionData.routeRef(options.routeRef);
}
@@ -395,9 +395,7 @@ describe('createExtensionTester', () => {
const tester = createExtensionTester(extension).add(extension2);
// @ts-expect-error
expect(tester.query(extension).get(stringDataRef)).toBe('nest-test-text');
// @ts-expect-error
expect(tester.query(extension2).get(stringDataRef)).toBe('test-text');
// @ts-expect-error
expect(tester.query(extension).input('input').data(stringDataRef)).toBe(
@@ -426,7 +424,6 @@ describe('createExtensionTester', () => {
inputs: { input: 'test-text' },
});
// @ts-expect-error
expect(tester.query(extension).get(stringDataRef)).toBe('nest-test-text');
});
});