Add pniSignatureVerified support
This commit is contained in:
parent
7dc11c1928
commit
95caf59c3c
11 changed files with 258 additions and 126 deletions
50
ts/test-node/util/generateConfigMatrix_test.ts
Normal file
50
ts/test-node/util/generateConfigMatrix_test.ts
Normal file
|
@ -0,0 +1,50 @@
|
|||
// Copyright 2024 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { assert } from 'chai';
|
||||
|
||||
import { generateConfigMatrix } from '../../util/generateConfigMatrix';
|
||||
|
||||
describe('generateConfigMatrix', () => {
|
||||
it('generates an empty list', () => {
|
||||
assert.deepStrictEqual(generateConfigMatrix({}), []);
|
||||
|
||||
assert.deepStrictEqual(
|
||||
generateConfigMatrix({
|
||||
prop1: [],
|
||||
prop2: [],
|
||||
}),
|
||||
[]
|
||||
);
|
||||
});
|
||||
|
||||
it('generates a single-element list', () => {
|
||||
assert.deepStrictEqual(
|
||||
generateConfigMatrix({
|
||||
prop1: ['a'],
|
||||
prop2: ['b'],
|
||||
}),
|
||||
[
|
||||
{
|
||||
prop1: 'a',
|
||||
prop2: 'b',
|
||||
},
|
||||
]
|
||||
);
|
||||
});
|
||||
|
||||
it('generates multiple permutations', () => {
|
||||
assert.deepStrictEqual(
|
||||
generateConfigMatrix({
|
||||
prop1: ['a', 'b'],
|
||||
prop2: ['c', 'd'],
|
||||
}),
|
||||
[
|
||||
{ prop1: 'a', prop2: 'c' },
|
||||
{ prop1: 'b', prop2: 'c' },
|
||||
{ prop1: 'a', prop2: 'd' },
|
||||
{ prop1: 'b', prop2: 'd' },
|
||||
]
|
||||
);
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue