-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Project): Adds support for variant languages/optional and turnin…
…g off learning objectives (#88) * WIP-feat(Project): Adds support for variant learning objectives * feat(Project): Adds support for multiple variants, creates new optionalLearningObjectives array in resulting JSON * feat(Project): Doesn't include learningObjectves arrays in resulting JSON if they're empty * feat(Project): Adds support for turning off learning objectives * fix(Project): Fixes linting issues * fix(tests): Corrects project.spec.js.snap snapshot * fix(tests): Fixes condition for when there are no optional learning objectives present in a project * feat(project): Adds support for optional learning objectives outside the variant object * tests(project): Add tests for variant and optional learning objectives * tests(project): Adds tests for variants/optional/turn off cases * tests(project): Adds case to test one missing line lol * feat(project): Simplifica lógica de parseado de OAs (WIP) * feat(project): Excluye OAs duplicados de variantes * test(project): Agrega prueba para validar comportamiento sugerido en comentarios de PR Ver https://github.com/Laboratoria/curriculum-parser/pull/88/files#r1558205050 * feat(project): Agrega parseado de project.tags --------- Co-authored-by: Lupo Montero <lupomontero@gmail.com>
- Loading branch information
1 parent
acafb52
commit 26d16a0
Showing
28 changed files
with
1,081 additions
and
90 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
15 changes: 15 additions & 0 deletions
15
lib/__tests__/__fixtures__/01-a-project-tags-not-array/README.md
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,15 @@ | ||
# A project | ||
|
||
## Índice | ||
|
||
Blah blah blah | ||
|
||
*** | ||
|
||
## 1. Preámbulo | ||
|
||
Blah blah blah | ||
|
||
## 2. Resumen del proyecto | ||
|
||
Blah blah blah |
8 changes: 8 additions & 0 deletions
8
lib/__tests__/__fixtures__/01-a-project-tags-not-array/project.yml
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,8 @@ | ||
track: web-dev | ||
tracks: | ||
- web-dev | ||
tags: omg | ||
learningObjectives: | ||
- html | ||
- css | ||
- dom |
15 changes: 15 additions & 0 deletions
15
lib/__tests__/__fixtures__/01-a-project-tags-not-strings/README.md
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,15 @@ | ||
# A project | ||
|
||
## Índice | ||
|
||
Blah blah blah | ||
|
||
*** | ||
|
||
## 1. Preámbulo | ||
|
||
Blah blah blah | ||
|
||
## 2. Resumen del proyecto | ||
|
||
Blah blah blah |
11 changes: 11 additions & 0 deletions
11
lib/__tests__/__fixtures__/01-a-project-tags-not-strings/project.yml
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,11 @@ | ||
track: web-dev | ||
tracks: | ||
- web-dev | ||
tags: | ||
- featured | ||
- foo: true | ||
bar: 1 | ||
learningObjectives: | ||
- html | ||
- css | ||
- dom |
15 changes: 15 additions & 0 deletions
15
lib/__tests__/__fixtures__/01-a-project-with-exclude-outside-variant/README.md
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,15 @@ | ||
# A project | ||
|
||
## Índice | ||
|
||
Blah blah blah | ||
|
||
*** | ||
|
||
## 1. Preámbulo | ||
|
||
Blah blah blah | ||
|
||
## 2. Resumen del proyecto | ||
|
||
Blah blah blah |
19 changes: 19 additions & 0 deletions
19
lib/__tests__/__fixtures__/01-a-project-with-exclude-outside-variant/project.yml
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,19 @@ | ||
track: web-dev | ||
tracks: | ||
- web-dev | ||
learningObjectives: | ||
- html/semantics | ||
- css/selectors | ||
- dom/selectors | ||
- dom/events | ||
- dom/manipulation | ||
- js/data-types/primitive-vs-non-primitive | ||
- js/data-types/strings | ||
- js/variables | ||
- js/conditionals | ||
- js/functions | ||
- js/semantics | ||
- ux/user-understanding | ||
- ux/prototyping | ||
- id: css | ||
exclude: true |
15 changes: 15 additions & 0 deletions
15
lib/__tests__/__fixtures__/01-a-project-with-invalid-learning-objectives/README.md
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,15 @@ | ||
# A project | ||
|
||
## Índice | ||
|
||
Blah blah blah | ||
|
||
*** | ||
|
||
## 1. Preámbulo | ||
|
||
Blah blah blah | ||
|
||
## 2. Resumen del proyecto | ||
|
||
Blah blah blah |
8 changes: 8 additions & 0 deletions
8
lib/__tests__/__fixtures__/01-a-project-with-invalid-learning-objectives/project.yml
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,8 @@ | ||
track: web-dev | ||
tracks: | ||
- web-dev | ||
learningObjectives: | ||
- html/semantics | ||
- css/selectors | ||
- name: react | ||
optional: true |
15 changes: 15 additions & 0 deletions
15
lib/__tests__/__fixtures__/01-a-project-with-invalid-tags/README.md
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,15 @@ | ||
# A project | ||
|
||
## Índice | ||
|
||
Blah blah blah | ||
|
||
*** | ||
|
||
## 1. Preámbulo | ||
|
||
Blah blah blah | ||
|
||
## 2. Resumen del proyecto | ||
|
||
Blah blah blah |
10 changes: 10 additions & 0 deletions
10
lib/__tests__/__fixtures__/01-a-project-with-invalid-tags/project.yml
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,10 @@ | ||
track: web-dev | ||
tracks: | ||
- web-dev | ||
tags: | ||
- featured | ||
- foo | ||
learningObjectives: | ||
- html | ||
- css | ||
- dom |
15 changes: 15 additions & 0 deletions
15
...tests__/__fixtures__/01-a-project-with-learning-objectives-turned-off/README.md
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,15 @@ | ||
# A project | ||
|
||
## Índice | ||
|
||
Blah blah blah | ||
|
||
*** | ||
|
||
## 1. Preámbulo | ||
|
||
Blah blah blah | ||
|
||
## 2. Resumen del proyecto | ||
|
||
Blah blah blah |
22 changes: 22 additions & 0 deletions
22
lib/__tests__/__fixtures__/01-a-project-with-learning-objectives-turned-off/project.yml
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,22 @@ | ||
track: web-dev | ||
tracks: | ||
- web-dev | ||
learningObjectives: | ||
- html/semantics | ||
- css/selectors | ||
- dom/selectors | ||
- dom/events | ||
- dom/manipulation | ||
- js/data-types/primitive-vs-non-primitive | ||
- js/data-types/strings | ||
- js/variables | ||
- js/conditionals | ||
- js/functions | ||
- js/semantics | ||
- ux/user-understanding | ||
- ux/prototyping | ||
variants: | ||
- name: foo | ||
learningObjectives: | ||
- id: css | ||
exclude: true |
15 changes: 15 additions & 0 deletions
15
...__tests__/__fixtures__/01-a-project-with-learning-objectives-variants/README.md
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,15 @@ | ||
# A project | ||
|
||
## Índice | ||
|
||
Blah blah blah | ||
|
||
*** | ||
|
||
## 1. Preámbulo | ||
|
||
Blah blah blah | ||
|
||
## 2. Resumen del proyecto | ||
|
||
Blah blah blah |
21 changes: 21 additions & 0 deletions
21
lib/__tests__/__fixtures__/01-a-project-with-learning-objectives-variants/project.yml
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,21 @@ | ||
track: web-dev | ||
tracks: | ||
- web-dev | ||
learningObjectives: | ||
- html/semantics | ||
- css/selectors | ||
- dom/selectors | ||
- dom/events | ||
- dom/manipulation | ||
- js/data-types/primitive-vs-non-primitive | ||
- js/data-types/strings | ||
- js/variables | ||
- js/conditionals | ||
- js/functions | ||
- js/semantics | ||
- ux/user-understanding | ||
- ux/prototyping | ||
variants: | ||
- name: node | ||
learningObjectives: | ||
- node |
15 changes: 15 additions & 0 deletions
15
...__tests__/__fixtures__/01-a-project-with-optional-learning-objectives/README.md
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,15 @@ | ||
# A project | ||
|
||
## Índice | ||
|
||
Blah blah blah | ||
|
||
*** | ||
|
||
## 1. Preámbulo | ||
|
||
Blah blah blah | ||
|
||
## 2. Resumen del proyecto | ||
|
||
Blah blah blah |
19 changes: 19 additions & 0 deletions
19
lib/__tests__/__fixtures__/01-a-project-with-optional-learning-objectives/project.yml
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,19 @@ | ||
track: web-dev | ||
tracks: | ||
- web-dev | ||
learningObjectives: | ||
- html/semantics | ||
- css/selectors | ||
- dom/selectors | ||
- dom/events | ||
- dom/manipulation | ||
- js/data-types/primitive-vs-non-primitive | ||
- js/data-types/strings | ||
- js/variables | ||
- js/conditionals | ||
- js/functions | ||
- js/semantics | ||
- ux/user-understanding | ||
- ux/prototyping | ||
- id: react | ||
optional: true |
15 changes: 15 additions & 0 deletions
15
lib/__tests__/__fixtures__/01-a-project-with-tags/README.md
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,15 @@ | ||
# A project | ||
|
||
## Índice | ||
|
||
Blah blah blah | ||
|
||
*** | ||
|
||
## 1. Preámbulo | ||
|
||
Blah blah blah | ||
|
||
## 2. Resumen del proyecto | ||
|
||
Blah blah blah |
12 changes: 12 additions & 0 deletions
12
lib/__tests__/__fixtures__/01-a-project-with-tags/project.yml
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,12 @@ | ||
track: web-dev | ||
tracks: | ||
- web-dev | ||
tags: | ||
- featured | ||
- beta | ||
- deprecated | ||
- hidden | ||
learningObjectives: | ||
- html | ||
- css | ||
- dom |
15 changes: 15 additions & 0 deletions
15
.../__fixtures__/01-a-project-with-variant-excluding-granular-objectives/README.md
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,15 @@ | ||
# A project | ||
|
||
## Índice | ||
|
||
Blah blah blah | ||
|
||
*** | ||
|
||
## 1. Preámbulo | ||
|
||
Blah blah blah | ||
|
||
## 2. Resumen del proyecto | ||
|
||
Blah blah blah |
13 changes: 13 additions & 0 deletions
13
..._tests__/__fixtures__/01-a-project-with-variant-excluding-granular-objectives/project.yml
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,13 @@ | ||
track: web-dev | ||
tracks: | ||
- web-dev | ||
learningObjectives: | ||
- dom/selectors | ||
- dom/events | ||
- dom/manipulation | ||
variants: | ||
- name: node | ||
learningObjectives: | ||
- node | ||
- id: dom/manipulation | ||
exclude: true |
15 changes: 15 additions & 0 deletions
15
...__fixtures__/01-a-project-with-variant-learning-objectives-duplicated/README.md
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,15 @@ | ||
# A project | ||
|
||
## Índice | ||
|
||
Blah blah blah | ||
|
||
*** | ||
|
||
## 1. Preámbulo | ||
|
||
Blah blah blah | ||
|
||
## 2. Resumen del proyecto | ||
|
||
Blah blah blah |
28 changes: 28 additions & 0 deletions
28
...tests__/__fixtures__/01-a-project-with-variant-learning-objectives-duplicated/project.yml
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,28 @@ | ||
track: web-dev | ||
tracks: | ||
- web-dev | ||
learningObjectives: | ||
- html/semantics | ||
- css/selectors | ||
- dom/selectors | ||
- dom/events | ||
- dom/manipulation | ||
- js/data-types/primitive-vs-non-primitive | ||
- js/data-types/strings | ||
- js/variables | ||
- js/conditionals | ||
- js/functions | ||
- js/semantics | ||
- ux/user-understanding | ||
- ux/prototyping | ||
- id: react | ||
optional: true | ||
variants: | ||
- name: node | ||
learningObjectives: | ||
- html/semantics | ||
- node | ||
- id: react | ||
optional: true | ||
- id: angular | ||
optional: true |
15 changes: 15 additions & 0 deletions
15
...__fixtures__/01-a-project-with-variant-learning-objectives-turned-off/README.md
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,15 @@ | ||
# A project | ||
|
||
## Índice | ||
|
||
Blah blah blah | ||
|
||
*** | ||
|
||
## 1. Preámbulo | ||
|
||
Blah blah blah | ||
|
||
## 2. Resumen del proyecto | ||
|
||
Blah blah blah |
Oops, something went wrong.