test: Add unit test (#20)
This commit is contained in:
committed by
Benedikt Rötsch
parent
c2297d2e99
commit
b6ae3f9f07
24
test/unit/mocks/index.js
Normal file
24
test/unit/mocks/index.js
Normal file
@@ -0,0 +1,24 @@
|
||||
const mockCourse = {
|
||||
sys: { id: 'courseId' },
|
||||
fields: {
|
||||
title: 'Course title',
|
||||
lessons: [
|
||||
{ sys: {id: 'lessonId'}, fields: { slug: 'lessonSlug', title: 'Lesson title' } }
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
const mockCategory = {
|
||||
sys: {
|
||||
id: 'categoryId'
|
||||
},
|
||||
fields: {
|
||||
slug: 'categorySlug',
|
||||
title: 'categoryTitle'
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
mockCourse,
|
||||
mockCategory
|
||||
}
|
||||
Reference in New Issue
Block a user