]> git.ardis.lu - envpass/commitdiff
Delete redundant settings
authorArdis Lu <ardisglu@gmail.com>
Mon, 7 Sep 2026 06:23:57 +0000 (23:23 -0700)
committerArdis Lu <ardisglu@gmail.com>
Mon, 7 Sep 2026 06:23:57 +0000 (23:23 -0700)
`{ concurrency: true }` already flows down from the surrounding `suite`, there is no need to pass it again on each `test`.

test/crypto.test.js
test/utils.test.js

index a87b37f0c565b5d401a3ae09a2312614ecd7b70e..e6b868fc70710590ad773bf3399a143f8566e338 100644 (file)
@@ -9,25 +9,25 @@ const prf = Uint8Array.fromHex('deadbeef0000000000000000000000000000000000000000
 const value = '🏴‍☠️ Hello, world!';
 
 suite('encryptRaw and decryptRaw', { concurrency: true }, () => {
-  test('works on simple string', { concurrency: true }, async () => {
+  test('works on simple string', async () => {
     deepStrictEqual(await encryptRaw({ version, prf, value }).then(value => decryptRaw({ prf, value })), value);
   });
 });
 
 suite('encryptRaw', { concurrency: true }, () => {
-  test('throws on invalid version', { concurrency: true }, async () => {
+  test('throws on invalid version', async () => {
     // @ts-expect-error
     await rejects(encryptRaw({ version: 'INVALID', prf, value }), { name: 'TypeError', message: 'envpass version "INVALID" is not supported.' });
   });
-  test('throws on invalid prf', { concurrency: true }, async () => {
+  test('throws on invalid prf', async () => {
     // @ts-expect-error
     await rejects(encryptRaw({ version, prf: 'INVALID', value }), { name: 'TypeError', message: 'prf "INVALID" is not an ArrayBuffer or Uint8Array.' });
   });
-  test('throws on invalid value', { concurrency: true }, async () => {
+  test('throws on invalid value', async () => {
     // @ts-expect-error
     await rejects(encryptRaw({ version, prf, value: {} }), { name: 'TypeError', message: 'Value "{}" is not a string.' });
   });
-  test('output value does not have base64 padding', { concurrency: true }, async () => {
+  test('output value does not have base64 padding', async () => {
     for (const value of ['', 'a', 'aa', 'aaa', 'aaaa', 'aaaaa', 'aaaaaa', 'aaaaaaa']) {
       const output = await encryptRaw({ version, prf, value });
       notDeepStrictEqual(output.at(-1), '=');
@@ -37,23 +37,23 @@ suite('encryptRaw', { concurrency: true }, () => {
 
 suite('decryptRaw', { concurrency: true }, () => {
   const value = 'envpass:v1:AAA';
-  test('throws on invalid prf', { concurrency: true }, async () => {
+  test('throws on invalid prf', async () => {
     // @ts-expect-error
     await rejects(decryptRaw({ prf: 'INVALID', value }), { name: 'TypeError', message: 'prf "INVALID" is not an ArrayBuffer or Uint8Array.' });
   });
-  test('throws on invalid value', { concurrency: true }, async () => {
+  test('throws on invalid value', async () => {
     // @ts-expect-error
     await rejects(decryptRaw({ prf, value: {} }), { name: 'TypeError', message: 'Value "{}" is not a string.' });
   });
-  test('throws on invalid magic in value', { concurrency: true }, async () => {
+  test('throws on invalid magic in value', async () => {
     // @ts-expect-error
     await rejects(decryptRaw({ prf, value: 'INVALID:v1:AAA' }), { name: 'TypeError', message: 'Value "INVALID:v1:AAA" is not an envpass encrypted value.' });
   });
-  test('throws on invalid version in value', { concurrency: true }, async () => {
+  test('throws on invalid version in value', async () => {
     // @ts-expect-error
     await rejects(decryptRaw({ prf, value: 'envpass:INVALID:AAA' }), { name: 'TypeError', message: 'envpass version "INVALID" is not supported.' });
   });
-  test('throws on invalid (non-base64) string in value', { concurrency: true }, async () => {
+  test('throws on invalid (non-base64) string in value', async () => {
     await rejects(decryptRaw({ prf, value: 'envpass:v1:🏴‍☠️' }), { name: 'SyntaxError', message: 'Found a character that cannot be part of a valid base64 string.' });
   });
 });
\ No newline at end of file
index 51d6e083a4404d1621802eefadfb713ab06e89c8..1eabdb4b3db1359a13b658fb588170eaae3f811c 100644 (file)
@@ -11,13 +11,13 @@ suite('toEnvString', { concurrency: true }, () => {
     { name: 'simple object', obj: { a: '1', b: '2', c: '3' }, str: 'a=1\nb=2\nc=3\n' },
   ];
   for (const { name, obj, str } of vectors) {
-    test(`converts: ${name}`, { concurrency: true }, () => {
+    test(`converts: ${name}`, () => {
       deepStrictEqual(toEnvString(obj), str);
     });
-    test(`inverses parseEnv for: ${name}`, { concurrency: true }, () => {
+    test(`inverses parseEnv for: ${name}`, () => {
       deepStrictEqual(toEnvString(parseEnv(str)), str);
     });
-    test(`is inverse of parseEnv for: ${name}`, { concurrency: true }, () => {
+    test(`is inverse of parseEnv for: ${name}`, () => {
       const env = Object.create(null);
       Object.assign(env, obj);
       deepStrictEqual(parseEnv(toEnvString(env)), env);
@@ -41,7 +41,7 @@ suite('parseEnvpassEncrypted', { concurrency: true }, () => {
     { name: 'rejects leading whitespace', input: ' envpass:v1:rXAhBNXZFsLl8EtZm3GHAZttZyLYP3j97Yy4qly53wBodRyyKYi8PlxjOlggc7mVLA/HoME4QSKdhuEs3C4UKvo0J3ZAV+JbrzfZbsBJ3tvvG4/UEVxB1+0IPoUyjhoO' },
   ];
   for (const { name, input } of rejects) {
-    test(name, { concurrency: true }, () => {
+    test(name, () => {
       deepStrictEqual(parseEnvpassEncrypted(input), null);
     });
   }
@@ -49,23 +49,23 @@ suite('parseEnvpassEncrypted', { concurrency: true }, () => {
     { name: 'accepts envpass encrypted string', input: 'envpass:v1:rXAhBNXZFsLl8EtZm3GHAZttZyLYP3j97Yy4qly53wBodRyyKYi8PlxjOlggc7mVLA/HoME4QSKdhuEs3C4UKvo0J3ZAV+JbrzfZbsBJ3tvvG4/UEVxB1+0IPoUyjhoO' },
   ];
   for (const { name, input } of accepts) {
-    test(name, { concurrency: true }, () => {
+    test(name, () => {
       deepStrictEqual(parseEnvpassEncrypted(input), input);
     });
   }
 });
 
 suite('InputError', { concurrency: true }, () => {
-  test('is throwable', { concurrency: true }, () => {
+  test('is throwable', () => {
     throws(() => { throw new InputError(); }, InputError);
   });
-  test('inherits Error', { concurrency: true }, () => {
+  test('inherits Error', () => {
     ok(new InputError() instanceof Error);
   });
-  test('sets name to "InputError"', { concurrency: true }, () => {
+  test('sets name to "InputError"', () => {
     deepStrictEqual(new InputError().name, 'InputError');
   });
-  test('accepts string message', { concurrency: true }, () => {
+  test('accepts string message', () => {
     const msg = 'TEST';
     deepStrictEqual(new InputError(msg).message, msg);
   });
This page took 0.044031 seconds and 4 git commands to generate.