Add empty string mapping test case

This commit is contained in:
Josh Gross
2022-11-23 14:30:36 -05:00
parent 4774a6a3d1
commit 109d9bc1be
@@ -158,7 +158,7 @@ jobs:
});
});
it("pos after colon in empty mapping", () => {
it("pos after colon in empty null mapping ", () => {
expect(
testFindToken(`on: push
jobs:
@@ -171,6 +171,19 @@ jobs:
});
});
it("pos after colon in empty string mapping", () => {
expect(
testFindToken(`on: push
jobs:
build:
container:|`)
).toEqual({
parent: ["job-factory", TokenType.Mapping],
key: [null, TokenType.String, "container"],
token: ["container", TokenType.String, ""]
});
});
it("pos after colon in mapping", () => {
expect(
testFindToken(`on: push