Skip to content

Commit 7465505

Browse files
committed
Fix tests
1 parent ddfd388 commit 7465505

File tree

4 files changed

+9
-11
lines changed

4 files changed

+9
-11
lines changed

test/unit/registry-domain-nested-renderer.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -279,10 +279,8 @@ describe('registry : routes : helpers : nested-renderer', () => {
279279
});
280280

281281
it('should return error in result callback', () => {
282-
expect(result).to.eql([
283-
new Error('Component not found!'),
284-
new Error('Component not found!')
285-
]);
282+
expect(result[0].toString()).to.equal('Error: Component not found!');
283+
expect(result[1].toString()).to.equal('Error: Component not found!');
286284
});
287285
});
288286
});

test/unit/registry-domain-validator.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,7 +1033,7 @@ describe('registry : domain : validator', () => {
10331033
});
10341034

10351035
it('should not return an error', () => {
1036-
expect(result.error).to.be.empty;
1036+
expect(result.error).to.be.undefined;
10371037
});
10381038
});
10391039

@@ -1045,7 +1045,7 @@ describe('registry : domain : validator', () => {
10451045
});
10461046

10471047
it('should not return an error', () => {
1048-
expect(result.error).to.be.empty;
1048+
expect(result.error).to.be.undefined;
10491049
});
10501050
});
10511051
});
@@ -1108,7 +1108,7 @@ describe('registry : domain : validator', () => {
11081108
});
11091109

11101110
it('should not return an error', () => {
1111-
expect(result.error).to.be.empty;
1111+
expect(result.error).to.be.undefined;
11121112
});
11131113
});
11141114

@@ -1120,7 +1120,7 @@ describe('registry : domain : validator', () => {
11201120
});
11211121

11221122
it('should not return an error', () => {
1123-
expect(result.error).to.be.empty;
1123+
expect(result.error).to.be.undefined;
11241124
});
11251125
});
11261126
});

test/unit/registry-routes-component.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ describe('registry : routes : component', () => {
260260
});
261261

262262
it('should respond without error for successful request', () => {
263-
expect(resJsonStub.args[0][0].error).to.be.empty;
263+
expect(resJsonStub.args[0][0].error).to.be.undefined;
264264
});
265265

266266
it('should respond with error message for component execution error', () => {

test/unit/registry-routes-helpers-get-component.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ describe('registry : routes : helpers : get-component', () => {
9696
);
9797
expect(fireStub.args[0][1].version).to.equal('1.0.0');
9898
expect(fireStub.args[0][1].renderMode).to.equal('rendered');
99-
expect(fireStub.args[0][1].duration).not.to.be.empty;
99+
expect(fireStub.args[0][1].duration).to.be.above(0);
100100
expect(fireStub.args[0][1].status).to.equal(200);
101101
});
102102
});
@@ -129,7 +129,7 @@ describe('registry : routes : helpers : get-component', () => {
129129
);
130130
expect(fireStub.args[0][1].version).to.equal('1.0.0');
131131
expect(fireStub.args[0][1].renderMode).to.equal('rendered');
132-
expect(fireStub.args[0][1].duration).not.to.be.empty;
132+
expect(fireStub.args[0][1].duration).to.be.above(0);
133133
expect(fireStub.args[0][1].status).to.equal(500);
134134
});
135135
});

0 commit comments

Comments
 (0)