@@ -46,8 +46,8 @@ describe('queries', () => {
46
46
const author = mongoose . Types . ObjectId ( )
47
47
48
48
const posts = await Post . create ( [
49
- { title : 'Super Duper' , author, content : createConent ( 1000 ) , contentLength : 1000 } ,
50
- { title : 'Amazing' , author, content : createConent ( 100 ) , contentLength : 100 } ,
49
+ { title : 'Super Duper' , author, content : createContent ( 1000 ) , contentLength : 1000 } ,
50
+ { title : 'Amazing' , author, content : createContent ( 100 ) , contentLength : 100 } ,
51
51
{ title : 'Other' , author, content : createContent ( 800 ) , contentLength : 800 }
52
52
] )
53
53
@@ -64,13 +64,13 @@ describe('queries', () => {
64
64
const post = await Post . create ( {
65
65
title : 'Super Duper' ,
66
66
author : author . id ,
67
- content : createConent ( 1000 ) ,
67
+ content : createContent ( 1000 ) ,
68
68
contentLength : 1000
69
69
} )
70
- const post2 = await Post . creatte ( {
70
+ const post2 = await Post . create ( {
71
71
author : author . id ,
72
72
title : 'Post 2' ,
73
- content : createConent ( 100 ) ,
73
+ content : createContent ( 100 ) ,
74
74
contentLength : 100 ,
75
75
similarPosts : [ post . id ]
76
76
} )
@@ -83,8 +83,8 @@ describe('queries', () => {
83
83
test ( 'only selects fields given' , async ( ) => {
84
84
const author = mongoose . Types . ObjectId ( )
85
85
await Post . create ( [
86
- { title : 'learn things' , content : createConent ( 100 ) , contentLength : 100 , author} ,
87
- { title : 'lean more things' , content : createConent ( 100 ) , contentLength : 100 , author} ,
86
+ { title : 'learn things' , content : createContent ( 100 ) , contentLength : 100 , author} ,
87
+ { title : 'lean more things' , content : createContent ( 100 ) , contentLength : 100 , author} ,
88
88
{ title : 'lean more things++' , content : createContent ( 100 ) , contentLength : 100 , author}
89
89
] )
90
90
@@ -98,7 +98,7 @@ describe('queries', () => {
98
98
} )
99
99
} )
100
100
describe ( 'addRelatedPosts' , ( ) => {
101
- test ( 'should not overrided related posts that are there' , async ( ) => {
101
+ test ( 'should not override related posts that are there' , async ( ) => {
102
102
const author = mongoose . Types . ObjectId ( )
103
103
const post = await Post . create ( {
104
104
author,
0 commit comments