-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
export const versions = ['1.0', '2.0']; | ||
|
||
export const slug = '/documentation/2.0/components/'; | ||
|
||
export const allDocs = [ | ||
{ | ||
id: '2a252835-849d-5e11-9b71-a4a18defc55b', | ||
excerpt: | ||
'Quick Start Install the latest version of Node.js, clone this repo and then:\n\nTo create a build locally:\n\nConfiguration\n\nThis static site…', | ||
frontmatter: { | ||
title: 'Development', | ||
}, | ||
internal: { | ||
contentFilePath: | ||
'/Users/mimiflynn/Projects/MS/ms-gh-pages/site/content/documentation/intro-doc.mdx', | ||
}, | ||
fields: { | ||
slug: '/documentation/intro-doc/', | ||
}, | ||
}, | ||
{ | ||
id: '9cbc3eec-d3ce-522a-b2fd-197c8407b252', | ||
excerpt: | ||
'This static site generator processes MDX in addition to traditional Markdown files. allows for the use of JSX components within Markdown.…', | ||
frontmatter: { | ||
title: 'Components 2.0', | ||
}, | ||
internal: { | ||
contentFilePath: | ||
'/Users/mimiflynn/Projects/MS/ms-gh-pages/site/content/documentation/2.0/components.mdx', | ||
}, | ||
fields: { | ||
slug: '/documentation/2.0/components/', | ||
}, | ||
}, | ||
{ | ||
id: '41748935-af24-51c3-8d32-458375e4246c', | ||
excerpt: | ||
'This static site generator processes MDX in addition to traditional Markdown files. allows for the use of JSX components within Markdown.…', | ||
frontmatter: { | ||
title: 'Components', | ||
}, | ||
internal: { | ||
contentFilePath: | ||
'/Users/mimiflynn/Projects/MS/ms-gh-pages/site/content/documentation/1.0/components.mdx', | ||
}, | ||
fields: { | ||
slug: '/documentation/1.0/components/', | ||
}, | ||
}, | ||
]; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// https://www.gatsbyjs.com/docs/how-to/testing/unit-testing/ | ||
|
||
module.exports = 'test-file-stub'; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// https://www.gatsbyjs.com/docs/how-to/testing/unit-testing/ | ||
|
||
const React = require('react'); | ||
const gatsby = jest.requireActual('gatsby'); | ||
Check failure on line 4 in site/__mocks__/gatsby.js GitHub Actions / build (18.x)
Check failure on line 4 in site/__mocks__/gatsby.js GitHub Actions / build (20.x)
|
||
|
||
module.exports = { | ||
...gatsby, | ||
graphql: jest.fn(), | ||
Check failure on line 8 in site/__mocks__/gatsby.js GitHub Actions / build (18.x)
Check failure on line 8 in site/__mocks__/gatsby.js GitHub Actions / build (20.x)
|
||
Link: jest.fn().mockImplementation( | ||
Check failure on line 9 in site/__mocks__/gatsby.js GitHub Actions / build (18.x)
Check failure on line 9 in site/__mocks__/gatsby.js GitHub Actions / build (20.x)
|
||
// these props are invalid for an `a` tag | ||
({ | ||
activeClassName, | ||
activeStyle, | ||
getProps, | ||
innerRef, | ||
partiallyActive, | ||
ref, | ||
replace, | ||
to, | ||
...rest | ||
}) => | ||
React.createElement('a', { | ||
...rest, | ||
href: to, | ||
}) | ||
), | ||
Slice: jest.fn().mockImplementation(({ alias, ...rest }) => | ||
Check failure on line 27 in site/__mocks__/gatsby.js GitHub Actions / build (18.x)
Check failure on line 27 in site/__mocks__/gatsby.js GitHub Actions / build (20.x)
|
||
React.createElement('div', { | ||
...rest, | ||
'data-test-slice-alias': alias, | ||
}) | ||
), | ||
useStaticQuery: jest.fn(), | ||
Check failure on line 33 in site/__mocks__/gatsby.js GitHub Actions / build (18.x)
Check failure on line 33 in site/__mocks__/gatsby.js GitHub Actions / build (20.x)
|
||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// https://www.gatsbyjs.com/docs/how-to/testing/unit-testing/ | ||
|
||
module.exports = { | ||
transform: { | ||
'^.+\\.jsx?$': `<rootDir>/tests/jest-preprocess.js`, | ||
}, | ||
moduleNameMapper: { | ||
'.+\\.(css|styl|less|sass|scss)$': `identity-obj-proxy`, | ||
'.+\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': `<rootDir>/__mocks__/file-mock.js`, | ||
}, | ||
testPathIgnorePatterns: [`node_modules`, `\\.cache`, `<rootDir>.*/public`], | ||
transformIgnorePatterns: [ | ||
`node_modules/(?!(gatsby|gatsby-script|gatsby-link)/)`, | ||
], | ||
globals: { | ||
__PATH_PREFIX__: ``, | ||
}, | ||
testEnvironmentOptions: { | ||
url: `http://localhost`, | ||
}, | ||
setupFiles: [`<rootDir>/tests/loadershim.js`], | ||
testEnvironment: `jsdom`, | ||
setupFilesAfterEnv: ['<rootDir>/tests/setup-test-env.js'], | ||
}; |