Skip to content

Commit

Permalink
fix: Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
HazAT committed Oct 24, 2018
1 parent 9cf2c4b commit 9662270
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 35 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// tslint:disable:deprecation
import { Integration } from '@sentry/types';
import { getIntegrationsToSetup } from '../../../src/integrations';
import { getIntegrationsToSetup } from '../../src/integration';

/** JSDoc */
class MockIntegration implements Integration {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/test/lib/sdk.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Integration } from '@sentry/types';
import { installedIntegrations } from '../../src/integrations';
import { installedIntegrations } from '../../src/integration';
import { initAndBind } from '../../src/sdk';
import { TestClient } from '../mocks/client';

Expand Down
33 changes: 0 additions & 33 deletions packages/node/test/domain.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,37 +28,4 @@ describe('domains', () => {
expect(getCurrentHub()).toBe(getCurrentHub());
});
});

test('concurrent domain hubs', done => {
const d1 = domain.create();
const d2 = domain.create();
let d1done = false;
let d2done = false;

d1.run(() => {
const hub = getCurrentHub();
hub.getStack().push({ client: 'process' });
expect(hub.getStack()[1]).toEqual({ client: 'process' });
// Just in case so we don't have to worry which one finishes first
// (although it always should be d2)
setTimeout(() => {
d1done = true;
if (d2done) {
done();
}
});
});

d2.run(() => {
const hub = getCurrentHub();
hub.getStack().push({ client: 'local' });
expect(hub.getStack()[1]).toEqual({ client: 'local' });
setTimeout(() => {
d2done = true;
if (d1done) {
done();
}
});
});
});
});

0 comments on commit 9662270

Please sign in to comment.