Skip to content

Commit 5a02660

Browse files
committed
updated sdk tests to use clone()
1 parent 54f7523 commit 5a02660

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

sdk/tests/wasm.test.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -452,13 +452,9 @@ describe('WASM Objects', () => {
452452
const recordCiphertextNotOwned = RecordCiphertext.fromString(RECORD_CIPHERTEXT_STRING_NOT_OWNED);
453453
const recordCiphertextNotOwned2 = RecordCiphertext.fromString(RECORD_CIPHERTEXT_STRING_NOT_OWNED2);
454454
const recordCiphertextArray = [recordCiphertext, recordCiphertextNotOwned, recordCiphertextNotOwned2];
455-
// Create copies of the record ciphertexts
456-
const recordCiphertextCopy1 = RecordCiphertext.fromString(RECORD_CIPHERTEXT_STRING_COPY);
457-
const recordCiphertextNotOwnedCopy1 = RecordCiphertext.fromString(RECORD_CIPHERTEXT_STRING_NOT_OWNED);
458-
const recordCiphertextNotOwned2Copy1 = RecordCiphertext.fromString(RECORD_CIPHERTEXT_STRING_NOT_OWNED2);
459-
const recordCiphertextArrayCopy = [recordCiphertextCopy1, recordCiphertextNotOwnedCopy1, recordCiphertextNotOwned2Copy1];
455+
const recordCiphertextArrayCopy = recordCiphertextArray.map(record => record.clone());
460456
const recordPlaintext = RecordPlaintext.fromString(RECORD_PLAINTEXT_STRING);
461-
const recordPlaintextCopy = RecordPlaintext.fromString(RECORD_PLAINTEXT_STRING);
457+
const recordPlaintextCopy = recordPlaintext.clone();
462458
const viewKeyString = "AViewKey1ccEt8A2Ryva5rxnKcAbn7wgTaTsb79tzkKHFpeKsm9NX";
463459
const viewKey = ViewKey.from_string(viewKeyString);
464460
const recordViewKeyString = "4445718830394614891114647247073357094867447866913203502139893824059966201724field";

0 commit comments

Comments
 (0)