rework Cortana scripts to remove duplicates, better document and support Windows version 2004/2009 #43

This commit is contained in:
undergroundwires
2020-12-26 02:39:26 +01:00
parent e14bf2bfa0
commit 7cc161c828
3 changed files with 110 additions and 40 deletions

View File

@@ -22,9 +22,10 @@ describe('CategoryParser', () => {
});
it('throws when children are empty', () => {
// arrange
const expectedMessage = 'category has no children';
const categoryName = 'test';
const expectedMessage = `category has no children: "${categoryName}"`;
const category: YamlCategory = {
category: 'test',
category: categoryName,
children: [],
};
const compiler = new ScriptCompilerStub();
@@ -35,9 +36,10 @@ describe('CategoryParser', () => {
});
it('throws when children are undefined', () => {
// arrange
const expectedMessage = 'category has no children';
const categoryName = 'test';
const expectedMessage = `category has no children: "${categoryName}"`;
const category: YamlCategory = {
category: 'test',
category: categoryName,
children: undefined,
};
const compiler = new ScriptCompilerStub();