-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Replacing Jasmine with Jest
- Loading branch information
Vladimir Bazhanov
authored
Jul 15, 2020
1 parent
2f35cc6
commit a97f420
Showing
19 changed files
with
3,449 additions
and
252 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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"env": { | ||
"jest": true | ||
}, | ||
"extends": [ | ||
"airbnb", | ||
"prettier" | ||
], | ||
"globals": { | ||
"App": true, | ||
"document": true, | ||
"localStorage": true, | ||
"window": true, | ||
"navigator": true, | ||
"fetch": true | ||
}, | ||
"parser": "babel-eslint" | ||
} |
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,6 +1,3 @@ | ||
cask "phantomjs" | ||
|
||
brew "graphviz" | ||
brew "node@12" | ||
brew "postgresql" | ||
brew "yarn" |
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
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,23 @@ | ||
import React from 'react' | ||
import ReactDOM from 'react-dom' | ||
import PropTypes from 'prop-types' | ||
|
||
const HelloWorld = ({ name }) => ( | ||
<h2> | ||
Hello, | ||
{name} | ||
! | ||
</h2> | ||
) | ||
|
||
HelloWorld.defaultProps = { name: "World"} | ||
|
||
HelloWorld.propTypes = { name: PropTypes.string } | ||
|
||
document.addEventListener("DOMContentLoaded", () => { | ||
ReactDOM.render( | ||
<HelloWorld />, document.getElementById("hello") | ||
) | ||
}) | ||
|
||
export default HelloWorld |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
.grid-x | ||
.cell | ||
h2 | ||
= title("Home") | ||
#hello | ||
|
||
= javascript_pack_tag "hello_world" |
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 |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
|
||
set -e | ||
|
||
bin/rspec spec | ||
bin/rake jasmine:ci | ||
bin/quality | ||
|
||
bin/rspec spec | ||
yarn test --passWithNoTests |
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,4 +1,10 @@ | ||
# Default settings | ||
# For more details see: https://github.com/github/secure_headers#configuration | ||
|
||
SecureHeaders::Configuration.default | ||
SecureHeaders::Configuration.default do |config| | ||
config.csp = { | ||
default_src: %w('self'), | ||
script_src: %w('self' 'unsafe-inline'), | ||
style_src: %w('self') | ||
} | ||
end |
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,19 @@ | ||
import React from 'react' | ||
import { shallow } from 'enzyme' | ||
import HelloWorld from 'packs/hello_world' | ||
|
||
describe('HelloWorld component', () => { | ||
describe('when no name is given', () => { | ||
it('render Hello, World!', () => { | ||
const wrapper = shallow(<HelloWorld />); | ||
expect(wrapper.text()).toBe('Hello, World!') | ||
}) | ||
}) | ||
|
||
describe('when a name is given as a prop', () => { | ||
it('render Hello, David!', () => { | ||
const wrapper = shallow(<HelloWorld name='David' />); | ||
expect(wrapper.text()).toBe('Hello, David!') | ||
}) | ||
}) | ||
}) |
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,4 @@ | ||
import Enzyme from 'enzyme' | ||
import EnzymeAdapter from 'enzyme-adapter-react-16' | ||
|
||
Enzyme.configure({ adapter: new EnzymeAdapter() }) |
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.