Skip to content

Commit

Permalink
test: tests fix
Browse files Browse the repository at this point in the history
  • Loading branch information
y-bobrovskaya committed Oct 21, 2021
1 parent a3b6740 commit 9aafe86
Show file tree
Hide file tree
Showing 7 changed files with 27,755 additions and 20,432 deletions.
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
14
4 changes: 2 additions & 2 deletions jestPreprocess.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
module.exports = require('babel-jest').createTransformer({
module.exports = require('babel-jest').default.createTransformer({
presets: [
'@babel/preset-flow',
[
'@babel/env',
{
targets: {
node: '8',
node: '14',
},
},
],
Expand Down
1 change: 1 addition & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[build]
publish = "public"
command = "npm run build"
NPM_VERSION = "7"
[build.environment]
YARN_VERSION = "1.3.2"
YARN_FLAGS = "--no-ignore-optional"
47,978 changes: 27,710 additions & 20,268 deletions package-lock.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"jsxBracketSameLine": true
},
"jest": {
"setupTestFrameworkScriptFile": "./setupTests.js",
"setupFilesAfterEnv": ["./setupTests.js"],
"testPathIgnorePatterns": [
"/node_modules/",
"/.cache/"
Expand All @@ -106,14 +106,14 @@
},
"devDependencies": {
"all-contributors-cli": "^5.4.0",
"babel-jest": "^23.2.0",
"babel-jest": "^27.3.1",
"dotenv": "^6.1.0",
"enzyme": "^3.5.1",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.4.0",
"flow-bin": "^0.162.1",
"flow-typed": "^3.3.1",
"jest": "^23.2.0",
"jest-enzyme": "^7.0.1",
"jest": "^27.3.1",
"jest-enzyme": "^7.1.2",
"pre-commit": "^1.2.2",
"prettier": "^1.13.5"
},
Expand Down
191 changes: 35 additions & 156 deletions src/components/__tests__/__snapshots__/speaker-page.test.jsx.snap
Original file line number Diff line number Diff line change
@@ -1,45 +1,13 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`<SpeakerPage> should match snapshot 1`] = `
<Flex
blacklist={
Array [
"css",
"flexWrap",
"flexDirection",
"alignItems",
"justifyContent",
"css",
"width",
"m",
"mt",
"mr",
"mb",
"ml",
"mx",
"my",
"p",
"pt",
"pr",
"pb",
"pl",
"px",
"py",
"fontSize",
"color",
"bg",
"flex",
"order",
"alignSelf",
]
}
<Styled(styled.div)
flexDirection={
Array [
"column",
"row",
]
}
is={[Function]}
m={
Array [
"2rem 2rem",
Expand All @@ -49,69 +17,11 @@ exports[`<SpeakerPage> should match snapshot 1`] = `
]
}
>
<Flex
<Styled(styled.div)
alignItems="center"
blacklist={
Array [
"css",
"flexWrap",
"flexDirection",
"alignItems",
"justifyContent",
"css",
"width",
"m",
"mt",
"mr",
"mb",
"ml",
"mx",
"my",
"p",
"pt",
"pr",
"pb",
"pl",
"px",
"py",
"fontSize",
"color",
"bg",
"flex",
"order",
"alignSelf",
]
}
flexDirection="column"
is={[Function]}
>
<Box
blacklist={
Array [
"css",
"width",
"m",
"mt",
"mr",
"mb",
"ml",
"mx",
"my",
"p",
"pt",
"pr",
"pb",
"pl",
"px",
"py",
"fontSize",
"color",
"bg",
"flex",
"order",
"alignSelf",
]
}
<styled.div
mb="16px"
style={
Object {
Expand All @@ -122,7 +32,7 @@ exports[`<SpeakerPage> should match snapshot 1`] = `
<Avatar
avatar={null}
/>
</Box>
</styled.div>
<SpeakerContacts
speaker={
Object {
Expand All @@ -138,34 +48,8 @@ exports[`<SpeakerPage> should match snapshot 1`] = `
}
}
/>
</Flex>
<Box
blacklist={
Array [
"css",
"width",
"m",
"mt",
"mr",
"mb",
"ml",
"mx",
"my",
"p",
"pt",
"pr",
"pb",
"pl",
"px",
"py",
"fontSize",
"color",
"bg",
"flex",
"order",
"alignSelf",
]
}
</Styled(styled.div)>
<styled.div
ml={
Array [
0,
Expand All @@ -174,44 +58,39 @@ exports[`<SpeakerPage> should match snapshot 1`] = `
}
>
<styled.h1 />
<Flex
blacklist={
Array [
"css",
"flexWrap",
"flexDirection",
"alignItems",
"justifyContent",
"css",
"width",
"m",
"mt",
"mr",
"mb",
"ml",
"mx",
"my",
"p",
"pt",
"pr",
"pb",
"pl",
"px",
"py",
"fontSize",
"color",
"bg",
"flex",
"order",
"alignSelf",
]
<Styled(styled.div)
as={
Object {
"$$typeof": Symbol(react.forward_ref),
"attrs": Array [],
"componentStyle": e {
"baseHash": -1550948005,
"baseStyle": undefined,
"componentId": "sc-iwjdpV",
"isStatic": false,
"rules": Array [
"
list-style: none;
",
],
"staticRulesId": "",
},
"displayName": "styled.ul",
"foldedComponentIds": Array [],
"render": [Function],
"shouldForwardProp": undefined,
"styledComponentId": "sc-iwjdpV",
"target": "ul",
"toString": [Function],
"warnTooManyClasses": [Function],
"withComponent": [Function],
}
}
flexDirection="column"
as={[Function]}
m={0}
mt="72px"
p={0}
/>
</Box>
</Flex>
</styled.div>
</Styled(styled.div)>
`;
2 changes: 1 addition & 1 deletion src/templates/blog-post.template.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const getCorrectTimeToReadNoun = getNoun('минута', 'минуты', 'мин
let Header = styled.header`
background-blend-mode: overlay;
background: #c788fe
url(${({ cover }) => cover || '/img/social-thumbnail-bg.png'}); // todo cover тут не прокинулся теперь
url(${({ cover }) => cover || '/img/social-thumbnail-bg.png'});
background-size: cover;
`

Expand Down

0 comments on commit 9aafe86

Please sign in to comment.