Skip to content

Commit

Permalink
test: improve test on gs1 test file
Browse files Browse the repository at this point in the history
  • Loading branch information
ldhyen99 committed Sep 12, 2024
1 parent 777e331 commit cd5fc36
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/services/src/__tests__/gs1.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@ describe('Gs1Provider', () => {

describe('getDlrUrl', () => {
it('should return null if code is not set', async () => {
const dlrUrl = await gs1Provider.getDlrUrl('', providerUrl);
const code = '';
jest.spyOn(publicAPI, 'post').mockResolvedValueOnce([]);
// Act
const dlrUrl = await gs1Provider.getDlrUrl(code, providerUrl);

// Assert
expect(dlrUrl).toBeNull();
});

Expand Down

0 comments on commit cd5fc36

Please sign in to comment.