@@ -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');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user