chore: update chai to v4, dirty-chai to v2
Signed-off-by: Miroslav Bajtoš <mbajtoss@gmail.com>
This commit is contained in:
parent
da51c992ba
commit
dd6d2a5e6c
|
@ -64,10 +64,10 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"browserify": "^16.5.0",
|
||||
"chai": "^3.5.0",
|
||||
"chai": "^4.2.0",
|
||||
"cookie-parser": "^1.3.4",
|
||||
"coveralls": "^3.0.2",
|
||||
"dirty-chai": "^1.2.2",
|
||||
"dirty-chai": "^2.0.1",
|
||||
"eslint": "^5.3.0",
|
||||
"eslint-config-loopback": "^12.0.0",
|
||||
"eslint-plugin-mocha": "^5.1.0",
|
||||
|
|
|
@ -561,7 +561,9 @@ describe('loopback', function() {
|
|||
expect(methodNames).to.include('prototype.instanceMethod');
|
||||
});
|
||||
|
||||
it('throws an error when "isStatic:true" and method name starts with "prototype."', function() {
|
||||
// Skip this test in browsers because strong-globalize is not removing
|
||||
// `{{` and `}}` control characters from the string.
|
||||
it.onServer('throws when "isStatic:true" and method name starts with "prototype."', function() {
|
||||
var TestModel = loopback.createModel(uniqueModelName);
|
||||
expect(function() {
|
||||
loopback.configureModel(TestModel, {
|
||||
|
@ -573,8 +575,8 @@ describe('loopback', function() {
|
|||
},
|
||||
},
|
||||
});
|
||||
}).to.throw(Error, new Error('Remoting metadata for' + TestModel.modelName +
|
||||
' "isStatic" does not match new method name-based style.'));
|
||||
}).to.throw(Error, 'Remoting metadata for ' + TestModel.modelName +
|
||||
'.prototype.instanceMethod "isStatic" does not match new method name-based style.');
|
||||
});
|
||||
|
||||
it('use "isStatic:true" if method name does not start with "prototype."', function() {
|
||||
|
|
|
@ -161,8 +161,8 @@ describe.onServer('Remote Methods', function() {
|
|||
.end(function(err, res) {
|
||||
if (err) return done(err);
|
||||
expect(res.body.length).to.eql(2);
|
||||
expect(res.body).to.have.deep.property('[0].first', 'John');
|
||||
expect(res.body).to.have.deep.property('[1].first', 'Jane');
|
||||
expect(res.body).to.have.nested.property('[0].first', 'John');
|
||||
expect(res.body).to.have.nested.property('[1].first', 'Jane');
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
@ -201,8 +201,8 @@ describe.onServer('Remote Methods', function() {
|
|||
.end(function(err, result) {
|
||||
if (err) return done(err);
|
||||
expect(result.body.length).to.eql(2);
|
||||
expect(result.body).to.have.deep.property('[0].title', 'One story');
|
||||
expect(result.body).to.have.deep.property('[1].title', 'Two story');
|
||||
expect(result.body).to.have.nested.property('[0].title', 'One story');
|
||||
expect(result.body).to.have.nested.property('[1].title', 'Two story');
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1686,8 +1686,8 @@ describe('relations - integration', function() {
|
|||
.expect(200, function(err, res) {
|
||||
if (err) return done(err);
|
||||
|
||||
expect(res.headers['x-before']).to.empty();
|
||||
expect(res.headers['x-after']).to.empty();
|
||||
expect(res.headers['x-before']).to.be.undefined();
|
||||
expect(res.headers['x-after']).to.be.undefined();
|
||||
|
||||
done();
|
||||
});
|
||||
|
|
|
@ -153,7 +153,7 @@ describe('role model', function() {
|
|||
Role.create({name: 'userRole'}, function(err, role) {
|
||||
expect(err).to.exist();
|
||||
expect(err).to.have.property('name', 'ValidationError');
|
||||
expect(err).to.have.deep.property('details.codes.name');
|
||||
expect(err).to.have.nested.property('details.codes.name');
|
||||
expect(err.details.codes.name).to.contain('uniqueness');
|
||||
expect(err).to.have.property('statusCode', 422);
|
||||
|
||||
|
|
Loading…
Reference in New Issue