-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cd9d6ff
commit 4d5bf7c
Showing
29 changed files
with
759 additions
and
517 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
module.exports = { | ||
presets: [ | ||
"@babel/preset-react", | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
targets: { | ||
node: "current", | ||
}, | ||
}, | ||
], | ||
], | ||
plugins: [ | ||
[ | ||
"@babel/plugin-proposal-private-property-in-object", | ||
{ | ||
loose: true, | ||
}, | ||
], | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
const babelOptions = { | ||
presets: ["babel-preset-gatsby"], | ||
} | ||
|
||
module.exports = require("babel-jest").createTransformer(babelOptions) | ||
module.exports = require("babel-jest").default.createTransformer(babelOptions) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 0 additions & 7 deletions
7
learning/web/src/components/CookieBanner/__snapshots__/index.test.js.snap
This file was deleted.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
learning/web/src/components/CookieBanner/__snapshots__/index.test.jsx.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`CookieBanner should render 🍪 1`] = `" "`; |
8 changes: 6 additions & 2 deletions
8
...src/components/CookieBanner/index.test.js → ...rc/components/CookieBanner/index.test.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
/** | ||
* @jest-environment jsdom | ||
*/ | ||
|
||
import React from "react" | ||
import CookieBanner from "./index" | ||
import { shallow } from "enzyme" | ||
import renderer from 'react-test-renderer'; | ||
|
||
describe(CookieBanner, () => { | ||
it("should render 🍪", () => { | ||
const component = shallow(<CookieBanner />) | ||
const component = renderer.create(<CookieBanner />).toJSON() | ||
expect(component).toMatchSnapshot() | ||
}) | ||
}) |
22 changes: 0 additions & 22 deletions
22
learning/web/src/components/Expander/__snapshots__/index.test.js.snap
This file was deleted.
Oops, something went wrong.
47 changes: 47 additions & 0 deletions
47
learning/web/src/components/Expander/__snapshots__/index.test.jsx.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Expander should render 1`] = ` | ||
<div | ||
className="sc-bczRLJ dOVkPd" | ||
> | ||
<button | ||
className="sc-gsnTZi fnbOwy" | ||
onClick={[Function]} | ||
title="expand" | ||
> | ||
Hola | ||
</button> | ||
<div | ||
className="sc-hKMtZM ijoscT hidden" | ||
> | ||
<button | ||
className="sc-dkzDqf grguyE" | ||
onClick={[Function]} | ||
title="close" | ||
> | ||
<svg | ||
fill="currentColor" | ||
height="1em" | ||
stroke="currentColor" | ||
strokeWidth="0" | ||
style={ | ||
Object { | ||
"color": undefined, | ||
} | ||
} | ||
viewBox="0 0 24 24" | ||
width="1em" | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<path | ||
d="M0 0h24v24H0z" | ||
fill="none" | ||
/> | ||
<path | ||
d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" | ||
/> | ||
</svg> | ||
</button> | ||
</div> | ||
</div> | ||
`; |
5 changes: 3 additions & 2 deletions
5
...web/src/components/Expander/index.test.js → ...eb/src/components/Expander/index.test.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
import React from "react" | ||
import Expander from "./index" | ||
import { shallow } from "enzyme" | ||
import renderer from "react-test-renderer" | ||
|
||
describe(Expander, () => { | ||
it("should render", () => { | ||
const component = shallow(<Expander title={"Hola"} children={<></>} />) | ||
const component = renderer.create(<Expander title={"Hola"} children={<></>} />) | ||
.toJSON() | ||
expect(component).toMatchSnapshot() | ||
}) | ||
}) |
69 changes: 0 additions & 69 deletions
69
learning/web/src/components/Layout/__snapshots__/index.test.js.snap
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.