mirror of
https://github.com/usebruno/bruno.git
synced 2025-03-14 23:08:20 +01:00
use to.not.be.empty
This commit is contained in:
parent
4a4481a26f
commit
5a9bda2a0f
@ -350,12 +350,7 @@ class AssertRuntime {
|
||||
expect(lhs).to.be.empty;
|
||||
break;
|
||||
case 'isNotEmpty':
|
||||
expect(lhs).to.not.be.oneOf([null, 0, false, '', []]);
|
||||
if (Array.isArray(lhs)) {
|
||||
expect(lhs).to.have.length.above(0);
|
||||
} else if (typeof lhs === 'object' && lhs !== null) {
|
||||
expect(Object.keys(lhs)).to.have.length.above(0);
|
||||
}
|
||||
expect(lhs).to.not.be.empty;
|
||||
break;
|
||||
case 'isNull':
|
||||
expect(lhs).to.be.null;
|
||||
|
Loading…
Reference in New Issue
Block a user