mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 02:54:11 +08:00
test: standardized jest unit testing (#10047)
This commit is contained in:
@ -114,18 +114,18 @@ function transformAst(node, css, type) {
|
||||
if (node.type === 'Raw') {
|
||||
return null;
|
||||
}
|
||||
throw Error("Unknown node type " + node.type);
|
||||
throw Error("Unknown node type ".concat(node.type));
|
||||
}
|
||||
function cssTreeParse(css, source) {
|
||||
var errors = [];
|
||||
var ast = css_tree_1.parse(css, {
|
||||
var ast = (0, css_tree_1.parse)(css, {
|
||||
parseValue: false,
|
||||
parseAtrulePrelude: false,
|
||||
parseRulePrelude: false,
|
||||
positions: true,
|
||||
filename: source,
|
||||
onParseError: function (error) {
|
||||
errors.push(source + ":" + error.line + ":" + error.column + ": " + error.formattedMessage);
|
||||
errors.push("".concat(source, ":").concat(error.line, ":").concat(error.column, ": ").concat(error.formattedMessage));
|
||||
},
|
||||
});
|
||||
if (errors.length > 0) {
|
||||
|
Reference in New Issue
Block a user