Skip to content

Commit

Permalink
Remove temporary work around in JS tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lorisleiva committed Feb 27, 2025
1 parent f0b96de commit 1964b56
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
10 changes: 2 additions & 8 deletions clients/js/test/createMetadata.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,7 @@ test('it creates a canonical metadata account with data larger than a transactio
const [program] = await createDeployedProgram(client, authority);

// When we create a canonical metadata account for the program with a lot of data.
const largeData = getUtf8Encoder().encode(
// TODO: Temporary workaround to avoid sending the exact same data.
'x'.repeat(1_000) + 'y'.repeat(1_000) + 'z'.repeat(1_000)
);
const largeData = getUtf8Encoder().encode('x'.repeat(3_000));
const { metadata } = await createMetadata({
...client,
payer: authority,
Expand Down Expand Up @@ -143,10 +140,7 @@ test('it creates a non-canonical metadata account with data larger than a transa
const program = address('TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA');

// When we create a non-canonical metadata account for the program with a lot of data.
const largeData = getUtf8Encoder().encode(
// TODO: Temporary workaround to avoid sending the exact same data.
'x'.repeat(1_000) + 'y'.repeat(1_000) + 'z'.repeat(1_000)
);
const largeData = getUtf8Encoder().encode('x'.repeat(3_000));
const { metadata } = await createMetadata({
...client,
payer: authority,
Expand Down
10 changes: 2 additions & 8 deletions clients/js/test/updateMetadata.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,7 @@ test('it updates a canonical metadata account with data larger than a transactio
});

// When we update the metadata account with new data with a lot of data.
const newData = getUtf8Encoder().encode(
// TODO: Temporary workaround to avoid sending the exact same data.
'x'.repeat(1_000) + 'y'.repeat(1_000) + 'z'.repeat(1_000)
);
const newData = getUtf8Encoder().encode('x'.repeat(3_000));
const { metadata } = await updateMetadata({
...client,
payer: authority,
Expand Down Expand Up @@ -200,10 +197,7 @@ test('it updates a non-canonical metadata account with data larger than a transa
});

// When we update the metadata account with new data.
const newData = getUtf8Encoder().encode(
// TODO: Temporary workaround to avoid sending the exact same data.
'x'.repeat(1_000) + 'y'.repeat(1_000) + 'z'.repeat(1_000)
);
const newData = getUtf8Encoder().encode('x'.repeat(3_000));
const { metadata } = await updateMetadata({
...client,
payer: authority,
Expand Down

0 comments on commit 1964b56

Please sign in to comment.