Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sjaanus committed Apr 23, 2024
1 parent 5980b00 commit 22d8ff2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
6 changes: 0 additions & 6 deletions src/lib/features/frontend-api/frontend-api.e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,6 @@ test('should be able to set environment as a context variable', async () => {
});

await frontendApiService.refreshData();
await ms(100);
await app.request
.get('/api/frontend?environment=staging')
.set('Authorization', frontendToken.secret)
Expand All @@ -611,11 +610,6 @@ test('should be able to set environment as a context variable', async () => {
expect(res.body.toggles).toHaveLength(0);
});
});

function ms(timeMs: number) {
return new Promise((resolve) => setTimeout(resolve, timeMs));
}

test('should filter features by project', async () => {
const projectA = 'projectA';
const projectB = 'projectB';
Expand Down
2 changes: 0 additions & 2 deletions src/lib/features/frontend-api/global-frontend-api-cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ export class GlobalFrontendApiCache extends EventEmitter {
const features = this.getTogglesByEnvironment(
this.environmentNameForToken(token),
);
console.log('get toggle');
return features[name];
}

Expand Down Expand Up @@ -115,7 +114,6 @@ export class GlobalFrontendApiCache extends EventEmitter {
try {
this.featuresByEnvironment = await this.getAllFeatures();
this.segments = await this.getAllSegments();
console.log('features updated');
if (this.status === 'starting') {
this.status = 'ready';
this.emit('ready');
Expand Down

0 comments on commit 22d8ff2

Please sign in to comment.