Skip to content

Commit 404f175

Browse files
authored
test(openfeature): match printf-style log.debug args (#8059)
The `FlaggingProvider` implementation was migrated to printf-style `log.debug('%s created with timeout: %dms', ...)` calls (cheaper in hot paths because the format string is only expanded when the log level is active). Two spec assertions still expected the pre-formatted interpolated strings and would fail once the production change lands. Update the two `sinon.assert.calledWith` calls to match the new format-string + positional-args shape. Pure test catch-up.
1 parent 2958b11 commit 404f175

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/dd-trace/test/openfeature/flagging_provider.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ describe('FlaggingProvider', () => {
7272
const provider = new FlaggingProvider(mockTracer, mockConfig)
7373

7474
assert.ok(provider)
75-
sinon.assert.calledWith(log.debug, 'FlaggingProvider created with timeout: 30000ms')
75+
sinon.assert.calledWith(log.debug, '%s created with timeout: %dms', 'FlaggingProvider', 30000)
7676
})
7777
})
7878

@@ -85,7 +85,7 @@ describe('FlaggingProvider', () => {
8585
provider._setConfiguration(ufc)
8686

8787
sinon.assert.calledOnceWithExactly(setConfigSpy, ufc)
88-
sinon.assert.calledWith(log.debug, 'FlaggingProvider provider configuration updated')
88+
sinon.assert.calledWith(log.debug, '%s provider configuration updated', 'FlaggingProvider')
8989
})
9090

9191
it('should handle null/undefined configuration gracefully', () => {

0 commit comments

Comments
 (0)