Skip to content

Commit

Permalink
test: empty object for wrap
Browse files Browse the repository at this point in the history
  • Loading branch information
mshanemc committed Jul 22, 2024
1 parent 9ff92c4 commit 748342c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/unit/sfErrorTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,13 @@ describe('SfError', () => {
assert(mySfError.cause instanceof Error);
expect(mySfError.cause.cause).to.equal(wrapMe);
});
it('empty object', () => {
const wrapMe = {};
const mySfError = SfError.wrap(wrapMe);
expect(mySfError).to.be.an.instanceOf(SfError);
assert(mySfError.cause instanceof Error);
expect(mySfError.cause.cause).to.equal(wrapMe);
});
it('an object that has a code', () => {
const wrapMe = { a: 2, code: 'foo' };
const mySfError = SfError.wrap(wrapMe);
Expand Down

4 comments on commit 748342c

@svc-cli-bot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logger Benchmarks - ubuntu-latest

Benchmark suite Current: 748342c Previous: 46cde13 Ratio
Child logger creation 472066 ops/sec (±1.71%) 471964 ops/sec (±0.63%) 1.00
Logging a string on root logger 866885 ops/sec (±9.50%) 763544 ops/sec (±7.79%) 0.88
Logging an object on root logger 647165 ops/sec (±8.77%) 606091 ops/sec (±6.29%) 0.94
Logging an object with a message on root logger 28717 ops/sec (±183.22%) 7994 ops/sec (±203.67%) 0.28
Logging an object with a redacted prop on root logger 526445 ops/sec (±5.71%) 409322 ops/sec (±10.23%) 0.78
Logging a nested 3-level object on root logger 18027 ops/sec (±186.84%) 365722 ops/sec (±8.40%) 20.29

This comment was automatically generated by workflow using github-action-benchmark.

@svc-cli-bot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Logger Benchmarks - ubuntu-latest'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 748342c Previous: 46cde13 Ratio
Logging a nested 3-level object on root logger 18027 ops/sec (±186.84%) 365722 ops/sec (±8.40%) 20.29

This comment was automatically generated by workflow using github-action-benchmark.

@svc-cli-bot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logger Benchmarks - windows-latest

Benchmark suite Current: 748342c Previous: 46cde13 Ratio
Child logger creation 344145 ops/sec (±0.34%) 324444 ops/sec (±0.94%) 0.94
Logging a string on root logger 814298 ops/sec (±5.54%) 749698 ops/sec (±4.89%) 0.92
Logging an object on root logger 622079 ops/sec (±6.98%) 563856 ops/sec (±6.77%) 0.91
Logging an object with a message on root logger 3926 ops/sec (±217.47%) 7961 ops/sec (±200.17%) 2.03
Logging an object with a redacted prop on root logger 443557 ops/sec (±6.89%) 417415 ops/sec (±15.08%) 0.94
Logging a nested 3-level object on root logger 319801 ops/sec (±5.85%) 334465 ops/sec (±5.21%) 1.05

This comment was automatically generated by workflow using github-action-benchmark.

@svc-cli-bot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Logger Benchmarks - windows-latest'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 748342c Previous: 46cde13 Ratio
Logging an object with a message on root logger 3926 ops/sec (±217.47%) 7961 ops/sec (±200.17%) 2.03

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.