-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #85 from rosticos/issue-61
Добавлен необязательный параметр default-context
- Loading branch information
Showing
7 changed files
with
119 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,49 @@ | ||
aspects: # Архитектурные аспекты | ||
dochub: | ||
title: DocHub | ||
location: DocHub | ||
dochub.git: | ||
title: Git | ||
location: DocHub/Git | ||
dochub.git.client: | ||
title: Развитие репы | ||
location: DocHub/GitLab/Git-клиент | ||
dochub.gitlab: | ||
title: GitLab | ||
location: DocHub/GitLab | ||
dochub.gitlab.auth: | ||
title: Авторизация GitLab | ||
location: DocHub/GitLab/Авторизация | ||
dochub.umlrender: | ||
title: Рендеринг PlantUML | ||
location: DocHub/Рендеринг/PlantUML | ||
dochub.contexts: | ||
title: Рендеринг контекстов | ||
location: DocHub/Рендеринг/Контексты | ||
dochub.aspects: | ||
title: Рендеринг аспектов | ||
location: DocHub/Рендеринг/Аспекты | ||
dochub.docs: | ||
title: Рендеринг документов | ||
location: DocHub/Рендеринг/Документы | ||
dochub.navigation: | ||
title: Навигация по архитектуре | ||
location: DocHub/Навигация по архитектуре | ||
dochub.radar: | ||
title: Технологический радар | ||
location: DocHub/Технологический радар | ||
dochub.cache: | ||
title: Кэш данных | ||
location: DocHub/Кэш | ||
dochub.manifest: | ||
title: Манифесты | ||
location: DocHub/Манифесты | ||
dochub.manifest.storage: | ||
title: Хранилище манифестов | ||
location: DocHub/Манифесты/Хранилище манифестов | ||
dochub.manifest.parsing: | ||
title: Парсинг манифестов | ||
location: DocHub/Манифесты/Парсинг манифестов | ||
dochub.dataset: | ||
title: Источники данных | ||
location: DocHub/Источники данных | ||
|
||
aspects: # Архитектурные аспекты | ||
dochub: | ||
title: DocHub | ||
location: DocHub | ||
dochub.git: | ||
title: Git | ||
location: DocHub/Git | ||
dochub.git.client: | ||
title: Развитие репы | ||
location: DocHub/GitLab/Git-клиент | ||
dochub.gitlab: | ||
title: GitLab | ||
location: DocHub/GitLab | ||
dochub.gitlab.auth: | ||
title: Авторизация GitLab | ||
location: DocHub/GitLab/Авторизация | ||
dochub.umlrender: | ||
title: Рендеринг PlantUML | ||
location: DocHub/Рендеринг/PlantUML | ||
dochub.contexts: | ||
title: Рендеринг контекстов | ||
location: DocHub/Рендеринг/Контексты | ||
dochub.aspects: | ||
title: Рендеринг аспектов | ||
location: DocHub/Рендеринг/Аспекты | ||
dochub.docs: | ||
title: Рендеринг документов | ||
location: DocHub/Рендеринг/Документы | ||
dochub.navigation: | ||
title: Навигация по архитектуре | ||
location: DocHub/Навигация по архитектуре | ||
dochub.radar: | ||
title: Технологический радар | ||
location: DocHub/Технологический радар | ||
dochub.cache: | ||
title: Кэш данных | ||
location: DocHub/Кэш | ||
dochub.manifest: | ||
title: Манифесты | ||
location: DocHub/Манифесты | ||
dochub.manifest.storage: | ||
title: Хранилище манифестов | ||
location: DocHub/Манифесты/Хранилище манифестов | ||
dochub.manifest.parsing: | ||
title: Парсинг манифестов | ||
location: DocHub/Манифесты/Парсинг манифестов | ||
dochub.dataset: | ||
title: Источники данных | ||
location: DocHub/Источники данных |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import DefaultSchema from './default/schema.json'; | ||
import Query from '../src/manifest/query'; | ||
import YAML from 'yaml'; | ||
|
||
test('Forms object to schema', () => { | ||
const query = YAML.parse(` | ||
test-aspect: | ||
title: test-aspect | ||
location: test-aspect | ||
default-context: default-context | ||
`); | ||
|
||
DefaultSchema.aspects = query; | ||
const evaluated = Query.expression(Query.defaultContextForAspect('test-aspect')).evaluate(DefaultSchema); | ||
|
||
expect(evaluated).toEqual('default-context'); | ||
}); | ||
|
||
test('Forms object to schema', () => { | ||
const query = YAML.parse(` | ||
test-aspect: | ||
title: test-aspect | ||
location: test-aspect | ||
`); | ||
|
||
DefaultSchema.aspects = query; | ||
const evaluated = Query.expression(Query.defaultContextForAspect('test-aspect')).evaluate(DefaultSchema); | ||
|
||
expect(evaluated).toEqual(undefined); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters