Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
🧪 stub example mocks + tests
  • Loading branch information
ooloth committed Nov 27, 2019
commit 484d67d542b47c27bd4bf0da91dc001ef40bfa06
25 changes: 25 additions & 0 deletions __mocks__/tutorials.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*

TODO: mock tutorials as they come from YAML
TODO: mock tutorials as they come from gatsby-node

*/

module.exports = {
tutorials: [
{
authors: ['Owlypixel'],
date: 'Nov 22, 2019',
fields: {
authorsAsString: 'owlypixel',
formatsAsString: 'text',
topicsAsString: 'themes mdx guitar',
},
formats: ['text'],
link: 'https://owlypixel.com/building-gatsbyjs-theme-from-scratch/',
source: 'owlypixel.com',
title: 'How to Build a GatsbyJS Guitar-Chords-MDX Theme From Scratch',
topics: ['guitar', 'mdx', 'themes'],
},
],
}
1 change: 0 additions & 1 deletion src/__tests__/example.js

This file was deleted.

7 changes: 7 additions & 0 deletions src/__tests__/filterTutorials.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// import { render } from '@testing-library/react'

import { filterTutorials } from '../logic/filterTutorials'

// TODO: write unit tests

test('it works', () => {})
7 changes: 7 additions & 0 deletions src/__tests__/searchFilteredTutorials.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// import { render } from '@testing-library/react'

import { searchFilteredTutorials } from '../logic/searchFilteredTutorials'

// TODO: write unit tests

test('it works', () => {})