From 2c068f2c4db27fbbde29d1cde43279515d96b376 Mon Sep 17 00:00:00 2001 From: jeromesimeon Date: Sat, 7 Aug 2021 10:25:59 -0400 Subject: [PATCH] test(metamodel) Add roundtrip test for metamodel itself Signed-off-by: jeromesimeon --- packages/concerto-core/test/introspect/metamodel.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/concerto-core/test/introspect/metamodel.js b/packages/concerto-core/test/introspect/metamodel.js index e2b7d873be..b2bf48a4a9 100644 --- a/packages/concerto-core/test/introspect/metamodel.js +++ b/packages/concerto-core/test/introspect/metamodel.js @@ -72,4 +72,15 @@ describe('MetaModel', () => { mm2.should.deep.equal(personMetaModel); }); }); + + describe('#meta-metamodel', () => { + it('should roundtrip the metamodel', () => { + const metaModel = MetaModel.metaModelCto; + const mm1 = MetaModel.ctoToMetaModel(metaModel, false); + const metaModel2 = MetaModel.ctoFromMetaModel(mm1); + const mm2 = MetaModel.ctoToMetaModel(metaModel2, false); + mm2.should.deep.equal(mm1); + }); + + }); });