lazy-assert
Advanced tools
Comparing version 0.2.10 to 0.2.11
{ | ||
"name": "lazy-assert", | ||
"version": "0.2.10", | ||
"version": "0.2.11", | ||
"description": "An way of doing assertion for lazy people ...", | ||
@@ -18,4 +18,4 @@ "main": "src/index.js", | ||
"test-compared-with-chai": "./node_modules/mocha/bin/mocha examples/6-compared-with-chai/__test/**/*.test.js", | ||
"test": "./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha src/**/__test/*.test.js", | ||
"test-lazy": "./node_modules/.bin/mocha src/**/__test/*.test.js", | ||
"test": "./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha src/**/__test/*.test.js src/__test/*.test.js", | ||
"test-lazy": "./node_modules/.bin/mocha src/**/__test/*.test.js src/__test/*.test.js", | ||
"open-cover": "open ./coverage/lcov-report/index.html" | ||
@@ -22,0 +22,0 @@ }, |
@@ -10,3 +10,4 @@ __tmp_expect__ = { | ||
"a": [ | ||
"number" | ||
"number", | ||
"undefined" | ||
], | ||
@@ -13,0 +14,0 @@ "b": [ |
@@ -209,2 +209,5 @@ var lazy = require('../index'); | ||
"string": "string" | ||
}, { | ||
'$COND.boolean': 'not-leaf', | ||
'$COND.array.[array:1].[or:3].a.[or:0]': 'leaf' | ||
}), -1); | ||
@@ -221,4 +224,7 @@ }); | ||
'array': [1, 'abc', null, {a: 1}, {b: [1, ['c']]}] | ||
}, { | ||
'$VAL.number': 'not-leaf', | ||
'$VAL.array.[2]': 'leaf' | ||
})); | ||
}); | ||
}); |
@@ -1118,7 +1118,7 @@ var utils = require('./utils'); | ||
* | ||
* 123 => "raw: 123 <<----- NOTICE" | ||
* 'abc' => "raw: 'abc' <<----- NOTICE" | ||
* true => "raw: true <<----- NOTICE" | ||
* null => "raw: null <<----- NOTICE" | ||
* undefined => "raw: undefined <<----- NOTICE" | ||
* 123 => "123 <<----- NOTICE" | ||
* 'abc' => "'abc' <<----- NOTICE" | ||
* true => "true <<----- NOTICE" | ||
* null => "null <<----- NOTICE" | ||
* undefined => "undefined <<----- NOTICE" | ||
* /// | ||
@@ -1131,3 +1131,4 @@ * valueDisplay: string | ||
&& typeof rawValue !== 'function') { | ||
return 'raw: ' + JSON.stringify(rawValue).split('"').join('\'') | ||
console.log('@@d', JSON.stringify(rawValue)); | ||
return (JSON.stringify(rawValue) || 'undefined').split('"').join('\'') | ||
+ validatorsUtils.getNoticeFlag(path, problemPaths); | ||
@@ -1134,0 +1135,0 @@ } else { |
@@ -48,6 +48,6 @@ var utils = require('../utils'); | ||
// console.log('@@d', actualPath, expectedPath); | ||
output && console.log('[INFO] refreshing ' + actualPath); | ||
utils.write(actualPath, | ||
utils.read(expectedPath) | ||
); | ||
output && console.log('[INFO] refreshed ' + actualPath); | ||
}); | ||
@@ -58,4 +58,6 @@ }, | ||
lib.forEachActual(basePath, function (actualPath) { | ||
output && console.log('[INFO] removing ' + actualPath); | ||
fs.unlink(actualPath); | ||
try { | ||
fs.unlink(actualPath); | ||
output && console.log('[INFO] removed ' + actualPath); | ||
} catch (ex) {} | ||
}); | ||
@@ -62,0 +64,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
877988
149
11510