-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add diagnostics for initialize time (#217)
* Add diagnostics for initialize time * update test * diagnostics framework * update schema * feedback
- Loading branch information
1 parent
d878f11
commit 1c04a38
Showing
12 changed files
with
271 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,7 +52,9 @@ describe('Layer Exposure Logging', () => { | |
value: { an_int: 99 }, | ||
}; | ||
|
||
await Statsig.initialize('client-key'); | ||
await Statsig.initialize('client-key', null, { | ||
disableDiagnosticsLogging: true, | ||
}); | ||
|
||
let layer = Statsig.getLayer('layer') as unknown as Indexable; | ||
layer.get('an_int', ''); | ||
|
@@ -65,7 +67,9 @@ describe('Layer Exposure Logging', () => { | |
|
||
describe.each([['getValue'], ['get']])('with method "%s"', (method) => { | ||
it('does not log a non-existent key', async () => { | ||
await Statsig.initialize('client-key'); | ||
await Statsig.initialize('client-key', null, { | ||
disableDiagnosticsLogging: true, | ||
}); | ||
|
||
let layer = Statsig.getLayer('layer') as unknown as Indexable; | ||
layer[method]('an_int', 0); | ||
|
@@ -88,7 +92,9 @@ describe('Layer Exposure Logging', () => { | |
explicit_parameters: [], | ||
}; | ||
|
||
await Statsig.initialize('client-key'); | ||
await Statsig.initialize('client-key', null, { | ||
disableDiagnosticsLogging: true, | ||
}); | ||
|
||
let layer = Statsig.getLayer('layer') as unknown as Indexable; | ||
layer[method]('an_int', 0); | ||
|
@@ -124,7 +130,9 @@ describe('Layer Exposure Logging', () => { | |
explicit_parameters: ['an_int'], | ||
}; | ||
|
||
await Statsig.initialize('client-key'); | ||
await Statsig.initialize('client-key', null, { | ||
disableDiagnosticsLogging: true, | ||
}); | ||
|
||
let layer = Statsig.getLayer('layer') as unknown as Indexable; | ||
layer[method]('an_int', 0); | ||
|
@@ -177,7 +185,9 @@ describe('Layer Exposure Logging', () => { | |
}, | ||
}; | ||
|
||
await Statsig.initialize('client-key'); | ||
await Statsig.initialize('client-key', null, { | ||
disableDiagnosticsLogging: true, | ||
}); | ||
|
||
let layer = Statsig.getLayer('layer') as unknown as Indexable; | ||
layer[method]('a_bool', false); | ||
|
@@ -215,7 +225,9 @@ describe('Layer Exposure Logging', () => { | |
}, | ||
}; | ||
|
||
await Statsig.initialize('client-key'); | ||
await Statsig.initialize('client-key', null, { | ||
disableDiagnosticsLogging: true, | ||
}); | ||
|
||
let layer = Statsig.getLayer('layer') as unknown as Indexable; | ||
Statsig.shutdown(); | ||
|
@@ -232,10 +244,16 @@ describe('Layer Exposure Logging', () => { | |
value: { an_int: 99 }, | ||
}; | ||
|
||
await Statsig.initialize('client-key', { | ||
userID: 'dloomb', | ||
email: '[email protected]', | ||
}); | ||
await Statsig.initialize( | ||
'client-key', | ||
{ | ||
userID: 'dloomb', | ||
email: '[email protected]', | ||
}, | ||
{ | ||
disableDiagnosticsLogging: true, | ||
}, | ||
); | ||
|
||
let layer = Statsig.getLayer('layer') as unknown as Indexable; | ||
layer[method]('an_int', 0); | ||
|
Oops, something went wrong.