This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
admin-panel/graphql-types/node_modules/yaml-ast-parser/test/yamlSyntax.test.ts

44 lines
1.1 KiB
TypeScript

import util = require("./testUtil");
suite('YAML Syntax', () => {
suite('Warnings for tab symbols', () => {
test('test 001', function () {
testErrors(
"schemas:\n" +
"\tsch1:\n",
[
{
line: 1,
column: 0,
message: "Using tabs can lead to unpredictable results",
isWarning: true
}
]
);
});
test('test 002', function () {
testErrors(
"level0:\n" +
" level1:\n" +
" level2:\n" +
" \t level3:\n",
[
{
line: 3,
column: 2,
message: "Using tabs can lead to unpredictable results",
isWarning: true
}
]
);
});
});
});
function testErrors(input:string,expectedErrors: util.TestError[]) {
util.testErrors(input, expectedErrors);
}