Skip to content

Commit

Permalink
Fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
maneesht committed Feb 20, 2025
1 parent 62ad9e2 commit 1bff800
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions packages/data-connect/test/unit/typings.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,20 @@
* limitations under the License.
*/

import { DataConnect, QueryRef, queryRef } from '../../src/api';
import { deleteApp, initializeApp } from '@firebase/app';
import { DataConnect, getDataConnect, QueryRef, queryRef } from '../../src/api';
describe('Typings', () => {
it('should properly infer the type', () => {
interface MyData {
extraField: boolean;
}
const app = initializeApp({ projectId: 'a' }, 'test');
const extendedType = Object.assign(
queryRef<MyData, undefined>({} as DataConnect, '', undefined),
queryRef<MyData, undefined>(
getDataConnect({ connector: 'c', location: 'l', service: 'n' }),
'',
undefined
),
{
__abc: true
}
Expand All @@ -34,5 +40,6 @@ describe('Typings', () => {
return { data };
}
myFn(extendedType).data.extraField;
deleteApp(app);
});

Check failure on line 44 in packages/data-connect/test/unit/typings.test.ts

View workflow job for this annotation

GitHub Actions / Test Packages With Changed Files in Chrome and Node

Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator

Check failure on line 44 in packages/data-connect/test/unit/typings.test.ts

View workflow job for this annotation

GitHub Actions / Test Packages With Changed Files in Firefox

Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator

Check failure on line 44 in packages/data-connect/test/unit/typings.test.ts

View workflow job for this annotation

GitHub Actions / Test Packages With Changed Files in Webkit

Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator
});

0 comments on commit 1bff800

Please sign in to comment.