File tree 2 files changed +11
-1
lines changed
packages/opentelemetry-sdk-trace-base/test/common
2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ module.exports = {
22
22
target : 'web' ,
23
23
output : { filename : 'bundle.js' } ,
24
24
resolve : { extensions : [ '.ts' , '.js' ] } ,
25
- devtool : 'inline -source-map' ,
25
+ devtool : 'eval -source-map' ,
26
26
module : {
27
27
rules : [
28
28
{ test : / \. t s $ / , use : 'ts-loader' } ,
Original file line number Diff line number Diff line change @@ -29,14 +29,24 @@ import {
29
29
hrTimeDuration ,
30
30
hrTimeToMilliseconds ,
31
31
hrTimeToNanoseconds ,
32
+ otperformance as performance ,
32
33
} from '@opentelemetry/core' ;
33
34
import { SemanticAttributes } from '@opentelemetry/semantic-conventions' ;
34
35
import * as assert from 'assert' ;
36
+ import * as sinon from 'sinon' ;
35
37
import { BasicTracerProvider , Span , SpanProcessor } from '../../src' ;
36
38
37
39
const performanceTimeOrigin = hrTime ( ) ;
38
40
39
41
describe ( 'Span' , ( ) => {
42
+ beforeEach ( ( ) => {
43
+ sinon . stub ( performance , 'timeOrigin' )
44
+ . value ( hrTimeToMilliseconds ( performanceTimeOrigin ) ) ;
45
+ } )
46
+ afterEach ( ( ) => {
47
+ sinon . restore ( ) ;
48
+ } ) ;
49
+
40
50
const tracer = new BasicTracerProvider ( {
41
51
spanLimits : {
42
52
attributeValueLengthLimit : 100 ,
You can’t perform that action at this time.
0 commit comments