Quit dropping KSAs

This commit is contained in:
Neale Pickett 2021-04-13 17:28:22 -06:00
parent cf83ea0d7d
commit 85b654e808
4 changed files with 14 additions and 0 deletions

View File

@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [v4.2.1] - unreleased
### Fixed
- Transpiled KSAs no longer dropped
## [v4.2.0] - 2020-03-26
### Changed
- example/5/draggable.js fix for FireFox to prevent dropping a draggable trying to load a URL

View File

@ -17,6 +17,9 @@ success:
mastery: say mrr
attachments:
- moo.txt
ksas:
- a1
- b2
---
YAML body
`)

View File

@ -184,6 +184,7 @@ func (fp FsPuzzle) Puzzle() (Puzzle, error) {
puzzle.Answers = static.Answers
puzzle.Authors = static.Authors
puzzle.Objective = static.Objective
puzzle.KSAs = static.KSAs
puzzle.Success = static.Success
puzzle.Body = string(body)
puzzle.AnswerPattern = static.AnswerPattern

View File

@ -35,6 +35,12 @@ func TestPuzzle(t *testing.T) {
if p.Success.Mastery != "say mrr" {
t.Error("Wrong Success.Mastery")
}
if len(p.KSAs) != 2 {
t.Error("KSAs are wrong")
}
if p.KSAs[0] != "a1" {
t.Error("KSAs[0] wrong")
}
if p.Body != "<p>YAML body</p>\n" {
t.Errorf("Body parsed wrong: %#v", p.Body)
}