Skip to content

Commit

Permalink
add a simple test
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacroldan committed Sep 19, 2024
1 parent a370db8 commit c0478b4
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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'

Expand Down Expand Up @@ -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'])
})
})

0 comments on commit c0478b4

Please sign in to comment.