Skip to content

Commit

Permalink
chore: Deduping test file across envs (#1159)
Browse files Browse the repository at this point in the history
  • Loading branch information
arboleya committed Aug 1, 2023
1 parent 0eb466a commit 1eecacb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 20 deletions.
2 changes: 2 additions & 0 deletions .changeset/witty-beers-enjoy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
16 changes: 0 additions & 16 deletions packages/crypto/src/browser/aes-ctr.test.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { encrypt, decrypt } from './aes-ctr';
import { envs } from './envs';

describe('Keystore', () => {
test('Encrypt and Decrypt', async () => {
it.each(envs)('Encrypt and Decrypt', async ({ encrypt, decrypt }) => {
const password = '0b540281-f87b-49ca-be37-2264c7f260f7';
const data = {
name: 'test',
Expand All @@ -17,7 +17,7 @@ describe('Keystore', () => {
expect(decryptedResult).toEqual(data);
});

test('Decrypt with wrong password should throw', async () => {
it.each(envs)('Decrypt with wrong password should throw', async ({ encrypt, decrypt }) => {
const password = '0b540281-f87b-49ca-be37-2264c7f260f7';
const data = {
name: 'test',
Expand All @@ -27,7 +27,7 @@ describe('Keystore', () => {
await expect(decrypt(`${password}123`, encryptedResult)).rejects.toThrow('Invalid credentials');
});

test('Decrypt Loop', async () => {
it.each(envs)('Decrypt Loop', async ({ decrypt }) => {
const INPUTS = [
{
data: '07yJczBTonXWyKdJfEcx',
Expand Down

0 comments on commit 1eecacb

Please sign in to comment.