Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
JPinkney committed Feb 1, 2018
1 parent 9e6bb69 commit cea9bfc
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/languageService/parser/yamlParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@ function recursivelyBuildAst(parent: ASTNode, node: Yaml.YAMLNode): ASTNode {
new NullASTNode(parent, null, node.startPosition, node.endPosition);
}
case Yaml.Kind.INCLUDE_REF: {
// Issue Warning
console.log("Unsupported feature, node kind: " + node.kind);
break;
const result = new StringASTNode(parent, null, false, node.startPosition, node.endPosition);
result.value = node.value;
return result;
}
}
}
Expand Down
16 changes: 16 additions & 0 deletions test/schemaValidation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,14 @@ suite("Validation Tests", () => {
}).then(done, done);
});

it('Include with value should not error', (done) => {
let content = `customize: !include customize.yaml`;
let validator = parseSetup(content);
validator.then(function(result){
assert.equal(result.length, 0);
}).then(done, done);
});

describe('Type tests', function(){

it('Type String does not error on valid node', (done) => {
Expand Down Expand Up @@ -204,6 +212,14 @@ suite("Validation Tests", () => {
}).then(done, done);
});

it('Include without value should error', (done) => {
let content = `customize: !include`;
let validator = parseSetup(content);
validator.then(function(result){
assert.equal(result.length, 1);
}).then(done, done);
});

});

});
Expand Down

0 comments on commit cea9bfc

Please sign in to comment.