Skip to content

Commit 70304b1

Browse files
committed
Fix tests and dependencies
1 parent 61ff961 commit 70304b1

5 files changed

+10
-12
lines changed

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
.DS_Store
2-
node_modules
2+
node_modules
3+
.idea/
4+
*.iml
5+
*.iws

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
"url": "git://github.com/drudge/mongoose-timestamp"
1717
},
1818
"devDependencies": {
19-
"mongoose": "^3.8.8",
20-
"should": "^3.2.0-beta1",
21-
"mocha": "^1.18.2"
19+
"mongoose": "~3.8.8",
20+
"should": "~3.2.0",
21+
"mocha": "~1.18.2"
2222
},
2323
"scripts": {
2424
"test": "mocha -u bdd -R spec -c ./test/*test.js"

test/custom_names_only_test.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,10 @@ mongoose.connection.on('error', function (err) {
1717

1818
var opts = {createdAt: 'customNameCreatedAt', updatedAt: 'customNameUpdatedAt'};
1919

20-
mongoose.plugin(timestamps, opts);
21-
2220
var CustomizedNameOnlyTimeCopSchema = new Schema({
2321
email: String
2422
});
23+
CustomizedNameOnlyTimeCopSchema.plugin(timestamps, opts);
2524

2625
var CustomizedNameOnlyTimeCop = mongoose.model('CustomizedNameOnlyTimeCop', CustomizedNameOnlyTimeCopSchema);
2726

test/custom_names_types_test.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,10 @@ var opts = {
2626
}
2727
};
2828

29-
mongoose.plugin(timestamps, opts);
30-
3129
var CustomizedNameAndTypesTimeCopSchema = new Schema({
3230
email: String
3331
});
34-
32+
CustomizedNameAndTypesTimeCopSchema.plugin(timestamps, opts);
3533
var CustomizedNameAndTypesTimeCop = mongoose.model('CustomizedNameAndTypesTimeCop', CustomizedNameAndTypesTimeCopSchema);
3634

3735
describe('timestamps custom names and types', function() {

test/index_test.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,10 @@ mongoose.connection.on('error', function (err) {
1515
console.error('Make sure a mongoDB server is running and accessible by this application')
1616
});
1717

18-
mongoose.plugin(timestamps);
19-
2018
var TimeCopSchema = new Schema({
2119
email: String
2220
});
23-
21+
TimeCopSchema.plugin(timestamps);
2422
var TimeCop = mongoose.model('TimeCop', TimeCopSchema);
2523

2624
describe('timestamps', function() {

0 commit comments

Comments
 (0)