From c0478b441e25a4720bd9c7dc89e332ff19aff9ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isaac=20Rold=C3=A1n?= Date: Thu, 19 Sep 2024 12:02:55 +0200 Subject: [PATCH] add a simple test --- .../specification.integration.test.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/packages/app/src/cli/models/extensions/specification.integration.test.ts b/packages/app/src/cli/models/extensions/specification.integration.test.ts index aabb895ab5..b2a2abc941 100644 --- a/packages/app/src/cli/models/extensions/specification.integration.test.ts +++ b/packages/app/src/cli/models/extensions/specification.integration.test.ts @@ -1,4 +1,5 @@ import {loadLocalExtensionsSpecifications} from './load-specifications.js' +import {createContractBasedModuleSpecification} from './specification.js' import {AppSchema} from '../app/app.js' import {describe, test, expect, beforeAll} from 'vitest' @@ -26,3 +27,20 @@ describe('allLocalSpecs', () => { expect(got.length).not.toEqual(0) }) }) + +describe('createContractBasedModuleSpecification', () => { + test('creates a specification with the given identifier', () => { + // When + const got = createContractBasedModuleSpecification('test', ['bundling']) + + // Then + expect(got).toMatchObject( + expect.objectContaining({ + identifier: 'test', + experience: 'extension', + uidStrategy: 'uuid', + }), + ) + expect(got.appModuleFeatures()).toEqual(['bundling']) + }) +})