File tree 1 file changed +12
-3
lines changed
1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -4,12 +4,21 @@ Tinytest.add("logging - _getCallerDetails", function (test) {
4
4
// in Chrome and Firefox, other browsers don't give us an ability to get
5
5
// stacktrace.
6
6
if ( ( new Error ) . stack ) {
7
- test . equal ( details . file , Meteor . isServer ?
8
- 'tinytest.js' : 'local-test_logging.js' ) ;
7
+ if ( Meteor . isServer ) {
8
+ test . equal ( details . file , 'tinytest.js' ) ;
9
+ } else {
10
+ // Note that we want this to work in --production too, so we need to allow
11
+ // for the minified filename.
12
+ test . matches ( details . file ,
13
+ / ^ (?: l o c a l - t e s t _ l o g g i n g \. j s | [ a - f 0 - 9 ] { 40 } \. j s ) $ / ) ;
14
+ }
9
15
10
16
// evaled statements shouldn't crash
11
17
var code = "Log._getCallerDetails().file" ;
12
- test . matches ( eval ( code ) , / ^ e v a l | l o c a l - t e s t _ l o g g i n g .j s $ / ) ;
18
+ // Note that we want this to work in --production too, so we need to allow
19
+ // for the minified filename
20
+ test . matches ( eval ( code ) ,
21
+ / ^ (?: e v a l | l o c a l - t e s t _ l o g g i n g \. j s | [ a - f 0 - 9 ] { 40 } \. j s ) / ) ;
13
22
}
14
23
} ) ;
15
24
You can’t perform that action at this time.
0 commit comments