From 86ce6931f548a72efeea9c36fb9fa153b28526bd Mon Sep 17 00:00:00 2001 From: "jonathan.casey" Date: Tue, 22 Aug 2023 22:56:38 +0100 Subject: [PATCH] feat(maps): add ENABLE_MAP_TYPE env var for test run Signed-off-by: jonathan.casey --- packages/concerto-analysis/test/unit/compare.test.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/concerto-analysis/test/unit/compare.test.ts b/packages/concerto-analysis/test/unit/compare.test.ts index 0f405580b..eb39b976c 100644 --- a/packages/concerto-analysis/test/unit/compare.test.ts +++ b/packages/concerto-analysis/test/unit/compare.test.ts @@ -70,6 +70,7 @@ test('should detect a change of namespace', async () => { ['asset', 'concept', 'enum', 'event', 'participant', 'transaction', 'map'].forEach(type => { test(`should detect a ${type} being added`, async () => { + process.env.ENABLE_MAP_TYPE = 'true'; // TODO Remove on release of MapType const [a, b] = await getModelFiles('empty.cto', `${type}-added.cto`); const results = new Compare().compare(a, b); expect(results.findings).toEqual(expect.arrayContaining([ @@ -230,6 +231,7 @@ test('should detect an array changing to a scalar', async () => { }); test('should detect a map key type changing from x to y', async () => { + process.env.ENABLE_MAP_TYPE = 'true'; // TODO Remove on release of MapType const [a, b] = await getModelFiles('map-added.cto', 'map-changed-key.cto'); const results = new Compare().compare(a, b); expect(results.findings).toEqual(expect.arrayContaining([ @@ -242,6 +244,7 @@ test('should detect a map key type changing from x to y', async () => { }); test('should detect a map value type changing from x to y', async () => { + process.env.ENABLE_MAP_TYPE = 'true'; // TODO Remove on release of MapType const [a, b] = await getModelFiles('map-added.cto', 'map-changed-value.cto'); const results = new Compare().compare(a, b); expect(results.findings).toEqual(expect.arrayContaining([