Skip to content

Commit 34106e3

Browse files
committed
chore: adds a test for if-eq
1 parent 64eb7ca commit 34106e3

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

app-config-extensions/src/index.test.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,4 +1108,18 @@ describe('extension combinations', () => {
11081108
fellBack: true,
11091109
});
11101110
});
1111+
1112+
it('combines $if and $eq', async () => {
1113+
const source = new LiteralSource({
1114+
$if: {
1115+
$check: {
1116+
$eq: ['foo', 'foo'],
1117+
},
1118+
$then: 'foo',
1119+
$else: 'bar',
1120+
},
1121+
});
1122+
1123+
await expect(source.readToJSON([ifDirective(), eqDirective()])).resolves.toEqual('foo');
1124+
});
11111125
});

0 commit comments

Comments
 (0)