Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "bd-conf", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "bd conf parser", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -109,4 +109,6 @@ /** | ||
throw new Error(`error format: ${command}`); | ||
console.warn(`conf parse error: wrong format: ${command}`); | ||
return null; | ||
} | ||
@@ -122,3 +124,6 @@ | ||
if (line) { | ||
result.push(parseCommand(line, index)); | ||
let command = parseCommand(line, index); | ||
if (command) { | ||
result.push(command); | ||
} | ||
} | ||
@@ -125,0 +130,0 @@ |
@@ -13,30 +13,30 @@ /** | ||
it('error format', function () { | ||
// it('error format', function () { | ||
// | ||
// expect(function () { | ||
// parse(); | ||
// }).toThrow(); | ||
// | ||
// expect(function () { | ||
// | ||
// parse( | ||
// ` | ||
// ahahaha | ||
// ` | ||
// ); | ||
// | ||
// }).toThrow(); | ||
// | ||
// expect(function () { | ||
// | ||
// parse( | ||
// ` | ||
// [.a.b] | ||
// ` | ||
// ); | ||
// | ||
// }).toThrow(); | ||
// | ||
// }); | ||
expect(function () { | ||
parse(); | ||
}).toThrow(); | ||
expect(function () { | ||
parse( | ||
` | ||
ahahaha | ||
` | ||
); | ||
}).toThrow(); | ||
expect(function () { | ||
parse( | ||
` | ||
[.a.b] | ||
` | ||
); | ||
}).toThrow(); | ||
}); | ||
it('basic', function () { | ||
@@ -43,0 +43,0 @@ |
12101
445