Skip to content

Commit 08df075

Browse files
committed
Fix equality test.
Was broken on Node 6, because `url.query` didn't expose `should`.
1 parent 3c54ce2 commit 08df075

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

test/controllers/TriplePatternFragmentsController-test.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,16 @@ describe('TriplePatternFragmentsController', function () {
7070
it('should call the first router with the request and an empty query', function () {
7171
routerA.extractQueryParams.should.have.been.calledOnce;
7272

73-
var extractQueryParamsArgs = routerA.extractQueryParams.firstCall.args;
74-
extractQueryParamsArgs[0].should.have.property('url');
75-
extractQueryParamsArgs[0].url.should.have.property('path', '/my-datasource?a=b&c=d');
76-
extractQueryParamsArgs[0].url.should.have.property('pathname', '/my-datasource');
77-
extractQueryParamsArgs[0].url.should.have.property('query');
78-
extractQueryParamsArgs[0].url.query.should.deep.equal({ a: 'b', c: 'd' });
79-
80-
extractQueryParamsArgs[1].should.be.an('object');
81-
extractQueryParamsArgs[1].should.have.property('features');
82-
extractQueryParamsArgs[1].features.should.be.an('array');
73+
var args = routerA.extractQueryParams.firstCall.args;
74+
expect(args[0]).to.have.property('url');
75+
expect(args[0].url).to.have.property('path', '/my-datasource?a=b&c=d');
76+
expect(args[0].url).to.have.property('pathname', '/my-datasource');
77+
expect(args[0].url).to.have.property('query');
78+
expect(args[0].url.query).to.deep.equal({ a: 'b', c: 'd' });
79+
80+
expect(args[1]).to.be.an('object');
81+
expect(args[1]).to.have.property('features');
82+
expect(args[1].features).to.be.an('array');
8383
});
8484

8585
it('should call the second router with the same request and query', function () {

0 commit comments

Comments
 (0)