Skip to content

Commit 19df4cd

Browse files
committed
Addressed comments
1 parent 250ae66 commit 19df4cd

File tree

3 files changed

+3
-20
lines changed

3 files changed

+3
-20
lines changed

config/mocharc.node.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
const config = {
2626
require: 'ts-node/register',
2727
timeout: 5000,
28-
retries: 5, // TODO(mtewani): Reset this to 5. Find a way to run the tests without stepping over itself.
28+
retries: 5,
2929
exit: true
3030
};
3131

packages/database/test/helpers/syncpoint-util.ts

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ class TestEventRegistration implements EventRegistration {
160160

161161
matches(otherEventRegistration: EventRegistration) {
162162
if (otherEventRegistration instanceof TestEventRegistration) {
163-
// TODO(mtewas unknown as TestEventRegistration rit
164163
return (
165164
(this as unknown as TestEventRegistration) === otherEventRegistration
166165
);
@@ -172,22 +171,6 @@ class TestEventRegistration implements EventRegistration {
172171
}
173172
}
174173

175-
function patchFakeAuthFunctions(app: FirebaseApp) {
176-
const token_ = null;
177-
178-
app['INTERNAL'] = app['INTERNAL'] || {};
179-
180-
app['INTERNAL']['getToken'] = function (forceRefresh) {
181-
return Promise.resolve(token_);
182-
};
183-
184-
app['INTERNAL']['addAuthTokenListener'] = function (listener) {};
185-
186-
app['INTERNAL']['removeAuthTokenListener'] = function (listener) {};
187-
188-
return app;
189-
}
190-
191174
class SyncPointListenProvider implements ListenProvider {
192175
private listens_: { [key: string]: boolean };
193176
constructor() {
@@ -237,7 +220,6 @@ export class SyncPointTestParser {
237220
{ databaseURL: 'http://tests.fblocal.com:9000' },
238221
'SYNCPOINT'
239222
);
240-
patchFakeAuthFunctions(this.app);
241223
}
242224

243225
// Check the number of required arguments
@@ -325,7 +307,6 @@ export class SyncPointTestParser {
325307
const eventFn =
326308
actualEventData.eventRegistration.getEventRunner(actualEventData);
327309
eventFn();
328-
console.log(currentSpec);
329310
const specStep = currentSpec;
330311
const actualPath = this.getTestPath(optBasePath, specStep.path);
331312
if (!pathEquals(currentPath, actualPath)) {
@@ -454,6 +435,7 @@ export class SyncPointTestParser {
454435
const registrations = {};
455436

456437
for (let i = 0; i < testSpec.steps.length; ++i) {
438+
// TODO: Create a separate object structure specifically for the steps.
457439
const spec = unsafeClone(testSpec.steps[i]);
458440
if ('.comment' in spec) {
459441
console.log(' > ' + spec['.comment']);

packages/database/test/syncpoint.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import { SyncPointTestParser } from './helpers/syncpoint-util';
1919
import syncPointSpecs from './helpers/syncPointSpec.json';
2020

21+
// TODO: We should eventually split this up into separate tests
2122
describe('Syncpoint Tests', () => {
2223
const util = new SyncPointTestParser();
2324
for (let i = 0; i < syncPointSpecs.length; i++) {

0 commit comments

Comments
 (0)