Skip to content

Commit

Permalink
Fix failing correct data submission test
Browse files Browse the repository at this point in the history
  • Loading branch information
iyannsch committed Oct 29, 2024
1 parent e8be59c commit 575379b
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -595,13 +595,11 @@ describe('CodeButtonComponent', () => {
gitToken: 'token',
};

for (const key in data) {
if (Object.hasOwn(data, key)) {
const input = Array.from(inputs).find((input) => input.name === key);
expect(input).toBeDefined();
expect(input!.value).toBe(data[key]);
}
}
expect(Array.from(inputs).find((input) => input.name === 'gitUri')).toBeDefined();

const gitUriTest = Array.from(inputs).find((input) => input.name === 'gitUri');
expect(gitUriTest).toBeDefined();
expect(data.gitUri).toBe(gitUriTest!.value);

windowOpenSpy.mockRestore();
documentAppendChildSpy.mockRestore();
Expand Down

0 comments on commit 575379b

Please sign in to comment.