File tree Expand file tree Collapse file tree 1 file changed +1
-13
lines changed
packages/browser/test/transports Expand file tree Collapse file tree 1 file changed +1
-13
lines changed Original file line number Diff line number Diff line change 1
- import { DSNComponents } from '@sentry/types' ;
2
1
import { expect } from 'chai' ;
3
2
import { BaseTransport } from '../../src/transports/base' ;
4
3
5
4
const testDSN = 'https://123@sentry.io/42' ;
6
5
7
6
class SimpleTransport extends BaseTransport { }
8
- // tslint:disable-next-line:max-classes-per-file
9
- class ComplexTransport extends BaseTransport {
10
- public composeUrl ( dsn : DSNComponents ) : string {
11
- return `https://${ dsn . host } /${ dsn . user } ` ;
12
- }
13
- }
14
7
15
8
describe ( 'BaseTransport' , ( ) => {
16
9
it ( 'doesnt provide send() implementation' , async ( ) => {
@@ -23,13 +16,8 @@ describe('BaseTransport', () => {
23
16
}
24
17
} ) ;
25
18
26
- it ( 'provides composeEndpointUrl() implementation ' , ( ) => {
19
+ it ( 'has correct endpoint url ' , ( ) => {
27
20
const transport = new SimpleTransport ( { dsn : testDSN } ) ;
28
21
expect ( transport . url ) . equal ( 'https://sentry.io/api/42/store/?sentry_key=123&sentry_version=7' ) ;
29
22
} ) ;
30
-
31
- it ( 'allows overriding composeEndpointUrl() implementation' , ( ) => {
32
- const transport = new ComplexTransport ( { dsn : testDSN } ) ;
33
- expect ( transport . url ) . equal ( 'https://sentry.io/123' ) ;
34
- } ) ;
35
23
} ) ;
You can’t perform that action at this time.
0 commit comments