-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from dcos-labs/danielmschmidt/DCOS-21785-jest
Setup jest
- Loading branch information
Showing
6 changed files
with
416 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,4 +11,5 @@ serve | |
tmp/ | ||
.vscode/ | ||
.env | ||
coverage | ||
|
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,41 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Badge danger 1`] = ` | ||
<span | ||
className="css-f00b3g" | ||
> | ||
danger | ||
</span> | ||
`; | ||
|
||
exports[`Badge default 1`] = ` | ||
<span | ||
className="css-b4fwwt" | ||
> | ||
default | ||
</span> | ||
`; | ||
|
||
exports[`Badge information 1`] = ` | ||
<span | ||
className="css-19f16re" | ||
> | ||
information | ||
</span> | ||
`; | ||
|
||
exports[`Badge success 1`] = ` | ||
<span | ||
className="css-1j3h1kw" | ||
> | ||
success | ||
</span> | ||
`; | ||
|
||
exports[`Badge warning 1`] = ` | ||
<span | ||
className="css-wz5vwa" | ||
> | ||
warning | ||
</span> | ||
`; |
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,35 @@ | ||
import React from "react"; | ||
import Badge from '../badge'; | ||
import renderer from 'react-test-renderer'; | ||
|
||
describe("Badge", () => { | ||
it("default", () => { | ||
expect(renderer | ||
.create(<Badge>default</Badge>) | ||
.toJSON()).toMatchSnapshot() | ||
}); | ||
|
||
it("success", () => { | ||
expect(renderer | ||
.create(<Badge appearance="success">success</Badge>) | ||
.toJSON()).toMatchSnapshot() | ||
}); | ||
|
||
it("information", () => { | ||
expect(renderer | ||
.create(<Badge appearance="information">information</Badge>) | ||
.toJSON()).toMatchSnapshot() | ||
}); | ||
|
||
it("warning", () => { | ||
expect(renderer | ||
.create(<Badge appearance="warning">warning</Badge>) | ||
.toJSON()).toMatchSnapshot() | ||
}); | ||
|
||
it("danger", () => { | ||
expect(renderer | ||
.create(<Badge appearance="danger">danger</Badge>) | ||
.toJSON()).toMatchSnapshot() | ||
}); | ||
}); |
Oops, something went wrong.