Skip to content

Commit

Permalink
changing default value of errorKind to sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
prklm10 committed Oct 20, 2023
1 parent 5714d4a commit 15b3d06
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/client/src/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ export class PercyClient {
return comparison;
}

async sendFailedEvents(buildId, { errorKind = 'cli', client = null, clientVersion = null, cliVersion = null, errorMessage = null } = {}) {
async sendFailedEvents(buildId, { errorKind = 'sdk', client = null, clientVersion = null, cliVersion = null, errorMessage = null } = {}) {
validateId('build', buildId);
this.log.debug('Sending FailedEvents');
return this.post(`builds/${buildId}/failed-events`, {
Expand Down
6 changes: 3 additions & 3 deletions packages/client/test/client.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1341,7 +1341,7 @@ describe('PercyClient', () => {
expect(api.requests['/builds/123/failed-events'][0].body).toEqual({
data: {
buildId: 123,
errorKind: 'cli',
errorKind: 'sdk',
client: null,
clientVersion: null,
cliVersion: null,
Expand All @@ -1352,7 +1352,7 @@ describe('PercyClient', () => {

it('should send failed event with default values', async () => {
await expectAsync(client.sendFailedEvents(123, {
errorKind: 'sdk',
errorKind: 'cli',
client: 'percy-appium-dotnet',
clientVersion: '3.0.1',
cliVersion: '1.27.3',
Expand All @@ -1364,7 +1364,7 @@ describe('PercyClient', () => {
expect(api.requests['/builds/123/failed-events'][0].body).toEqual({
data: {
buildId: 123,
errorKind: 'sdk',
errorKind: 'cli',
client: 'percy-appium-dotnet',
clientVersion: '3.0.1',
cliVersion: '1.27.3',
Expand Down

0 comments on commit 15b3d06

Please sign in to comment.